go.mod file not found in current directory or any parent directory; see 'go help modules' (exit status 1)

原因:

目录少缺少 go.mod 文件。

解决方法:

在终端中输入:

go mod init main

其中 main 是模块名。

go.mod file not found in current directory or any parent directory; see 'go help modules' (exit status 1)的更多相关文章

  1. go.mod file not found in current directory or any parent directory; see 'go help modules'

    go的环境设置问题,执行 go env -w GO111MODULE=auto 我的环境:Windows 7, Go 1.17 D:\Apps\GOPATH\src\code.oldboyedu.co ...

  2. go: go.mod file not found in current directory or any parent directory; see 'go help mod 解决

    go: go.mod file not found in current directory or any parent directory; see 'go help mod go:在当前目录或任何 ...

  3. [部署日记]GO在Visual Studio Code初次运行时提示go: go.mod file not found in current directory or any parent directory; see 'go help modules'

    我裂开,一波未平一波又起... 按照MS教程上填写 package main import "fmt" func main() { fmt.Println("Hello ...

  4. Understanding go.sum and go.mod file in Go

    https://golangbyexample.com/go-mod-sum-module/ Understanding go.sum and go.mod file in Go (Golang) – ...

  5. Docker: adding a file from a parent directory

    17down votefavorite 4 In my Dockerfile I've got : ADD ../../myapp.war /opt/tomcat7/webapps/ That fil ...

  6. 12C数据库ORA-40365: The SYS user cannot be locked while the password file is in its current format

    [环境介绍] 系统环境:Solaris + Oracle 12CR2   [背景描述] 基于集团数据库安全检查项,需要把sys用户锁定或者修改复杂口令整改. 在整改前已经对参数remote_login ...

  7. The directory '/home/stone/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If execu

    使用sudo pip install ......的时候出现下面一段黄色的代码: The directory '/home/stone/.cache/pip/http' or its parent d ...

  8. env: python3: No such file or directory exit status 127 FER ESPectro Core 编译出错

    苹果电脑安装了Arduino,布置ESP8266开发环境,编译程序过程中出现错误: env: python3:No such file or directoryexit status 127为开发板 ...

  9. 【解决了一个小问题】golang中引用一个路径较长的库,导致goland中出现"module contains a go.mod file, so major version must be compatible: should be v0 or v1, not v2"

    在项目中的go.mod文件中有这样一句: require ( github.com/xxx-devops/xx1/sdk/go v2.2.3 ) 项目的编译没有问题,但是goland中出现如下提示: ...

  10. mac brew 安装php扩展报错:parent directory is world writable but not sticky

    $ brew install php70-mcrypt 报错: Error: parent directory is world writable but not sticky 搜索到github的答 ...

随机推荐

  1. 力扣575(java&python)-分糖果(简单)

    题目: Alice 有 n 枚糖,其中第 i 枚糖的类型为 candyType[i] .Alice 注意到她的体重正在增长,所以前去拜访了一位医生. 医生建议 Alice 要少摄入糖分,只吃掉她所有糖 ...

  2. HarmonyOS NEXT应用开发案例——列表编辑实现

    介绍 本示例介绍用过使用ListItem组件属性swipeAction实现列表左滑编辑效果的功能. 该场景多用于待办事项管理.文件管理.备忘录的记录管理等. 效果图预览 使用说明: 点击添加按钮,选择 ...

  3. 了解3D世界的黑魔法-纯Java构造一个简单的3D渲染引擎

    简介: 对于非渲染引擎相关工作的开发者来说,可能认为即使构建最简单的3D程序也非常困难,但事实上并非如此,本篇文章将通过简单的200多行的纯 Java代码,去实践正交投影.简单三角形光栅化.z缓冲(深 ...

  4. Flink CDC 2.0 正式发布,详解核心改进

    简介: 本文由社区志愿者陈政羽整理,内容来源自阿里巴巴高级开发工程师徐榜江 (雪尽) 7 月 10 日在北京站 Flink Meetup 分享的<详解 Flink-CDC>.深入讲解了最新 ...

  5. 非技术 对以后各大应用功能与 AI 助手的思考

    本文记录我对于 AI 助手在未来给各大应用或网站或设备带来的影响的思考 结论:未来的各大应用或网站或者是设备,都不会出现满屏的眼花缭乱的功能,取代的是各自有一个专属的 AI 助手,通过 AI 助手与人 ...

  6. 【爬虫+情感判定+Top10高频词+词云图】"乌克兰"油管热评python舆情分析

    目录 一.分析背景 二.整体思路 三.代码讲解 3.1 爬虫采集 3.2 情感判定 3.3 Top10高频词 3.4 词云图 四.得出结论 五.同步视频演示 六.附完整源码 一.分析背景 乌克兰局势这 ...

  7. ansible(2)--ansible的安装与配置文件管理

    目录 1 ansible的安装 1.1 yum安装 1.2 pip安装 2 ansible相关文件 2.1 ansible配置文件 2.2 ansible配置文件的优先级 2.3 ansible的主机 ...

  8. Ubuntu中安装OpenSSL

    一.前期准备 1.1 压缩包下载 在安装openssl之前,我们需要下载对应的压缩包 https://www.openssl.org/source/openssl-3.0.1.tar.gz 此压缩包可 ...

  9. 让智慧物联赋能高效生产, AIRIOT助力数字化油田转型升级

    ​ 近年来,中国石油行业为了推进工业化和信息化深度融合,充分结合勘探开发.生产科研和经营管理的实际需求,积极通过信息化建设促进油田业务转型升级.在勘探开发与管理的领域中,油气生产物联网系统是一个极其重 ...

  10. bond网卡

    目录 一.bond概述 1.1.bond的优点 二.bond模式 2.1.mode=0 2.2.mode=1 2.3.mode=2 2.4.mode=3 2.5.mode=4 2.6.mode=5 2 ...