当前位置:网站首页>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 .
边栏推荐
- Fastdds server records - Translation-
- MySQL development environment
- Matlab | visualization of mathematical properties related to three interesting circles
- 第1章 绪论
- A^2=e | the solution of the equation | what exactly can this equation tell us
- 手机新领域用法知识
- 乐得瑞LDR6035 USB-C接口设备支持可充电可OTG传输数据方案。
- Resnet152 pepper pest image recognition 1.0
- 008 C语言基础:C判断
- Mobilenet series (4): mobilenetv3 network details
猜你喜欢

使用promise的基本功能【四、Promise源码】

低代码开发平台NocoBase的安装

为什么 C# 访问 null 字段会抛异常?
![[BJDCTF2020]The mystery of ip](/img/f8/c3a7334252724635d42c8db3d1bbb0.png)
[BJDCTF2020]The mystery of ip

Cvpr2021:separating skills and concepts for new visual question answering

MySql的开发环境

math_ Number set (number set symbol) and set theory

渗透测试-目录遍历漏洞

Cultural tourism night tour | stimulate tourists' enthusiasm with immersive visual experience

面对AI人才培养的“产学研”鸿沟,昇腾AI如何做厚产业人才黑土地?
随机推荐
Building lightweight target detection based on mobilenet-yolov4
Fplan power planning
733. 图像渲染
008 C语言基础:C判断
2022-06-26:以下golang代码输出什么?A:true;B:false;C:编译错误。 package main import “fmt“ func main() { type
math_ Number set (number set symbol) and set theory
List of best reading materials for machine learning in communication
016 C语言基础:C语言枚举类型
2021:Greedy Gradient Ensemble for Robust Visual Question Answering
ERP demand and sales management Kingdee
低代码开发平台NocoBase的安装
In a sense, the Internet has become an incubator and a parent
1.5 conda的使用
微服务系统设计——微服务监控与系统资源监控设计
文旅夜游|以沉浸式视觉体验激发游客的热情
再探Handler(上)(Handler核心原理最全解析)
Installation of low code development platform nocobase
[数组]BM94 接雨水问题-较难
Installing MySQL on Windows
Fplan layout