当前位置:网站首页>Golang Hello installation environment exception [resolved]
Golang Hello installation environment exception [resolved]
2022-06-27 04:20:00 【JavaPub-rodert】
List of articles
Abnormal information
Initial installation go Environmental Science -hello
go: go.mod file not found in current directory or any parent directory; see 'go help modules'
Cause analysis :
go The problem of environment configuration of . And golang Package management for .
Solution :
If you are Windows System , Shortcut key “Win+R”, Input cmd, Open the terminal . Input :
go env -w GO111MODULE=auto
explain :
GO111MODULE yes Go 1.11 The new version of module management mode introduced .
GO111MODULE Environment variables are used to turn on or off Go Modules in the language support , It has off、on、auto Three options , The default is auto.
GO111MODULE=off
No module support ,go From $GOPATH The folder and vendor Find dependencies in directory .
GO111MODULE=on
Module support ,go Ignore $GOPATH Folder , Based on go.mod Download dependency .
GO111MODULE=auto
stay $GOPATH/src Outer layer and root directory has go.mod When you file , Enable module support ; No, no module support .
边栏推荐
猜你喜欢
Kotlin compose custom compositionlocalprovider compositionlocal
JMeter takes the result of the previous request as the parameter of the next request
如何让 EF Core 6 支持 DateOnly 类型
PostgreSQL基础命令教程:创建新用户admin来访问PostgreSQL
Basic functions of promise [IV. promise source code]
Cvpr2021:separating skills and concepts for new visual question answering
WPF 开源控件库Extended WPF Toolkit介绍(经典)
微服务系统设计——微服务监控与系统资源监控设计
Mobilenet series (4): mobilenetv3 network details
[promise I] introduction of promise and key issues of hand rolling
随机推荐
Semantic version 2.0.0
Is the truth XX coming? Why are test / development programmers unwilling to work overtime? This is a crazy state
WPF open source control library extended WPF toolkit Introduction (Classic)
Resnet152 pepper pest image recognition 1.0
Fastdds server records - Translation-
QChart笔记2: 添加鼠标悬停显示
Fplan powerplan instance
fplan-布局
Cultural tourism light show breaks the time and space constraints and shows the charm of night tour in the scenic spot
windows上安装MySQL
MySql的开发环境
卷积神经网络(CNN)网络结构及模型原理介绍
021 C语言基础:递归,可变参数
022 C语言基础:C内存管理与C命令行参数
面对AI人才培养的“产学研”鸿沟,昇腾AI如何做厚产业人才黑土地?
Quickly master asp Net authentication framework identity - reset password by mail
从某种意义来讲,互联网业已成为了一个孵化器,一个母体
Kotlin compose custom compositionlocalprovider compositionlocal
MySQL development environment
Qchart note 2: add rollover display