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. 力扣579(MySQL)-查询员工的累积薪水(困难)

    题目: Employee 表保存了一年内的薪水信息. 请你编写 SQL 语句,对于每个员工,查询他除最近一个月(即最大月)之外,剩下每个月的近三个月的累计薪水(不足三个月也要计算). 结果请按 Id ...

  2. 终于要跟大家见面了,Flink 面试指南

    面试,一个令人大多数同学头疼的问题,要么成功进入心仪公司,要么沮丧与其失之交臂.但是,如果能在面试前就能知道面试官将会问的问题,然后可以好好提前准备,这种感觉是不是特别棒? 之前社区帮大家汇总了目前 ...

  3. Metasploit 实现木马生成、捆绑及免杀

    ​简介: 在渗透测试的过程中,避免不了使用到社会工程学的方式来诱骗对方运行我们的木马或者点击我们准备好的恶意链接.木马的捆绑在社会工程学中是我们经常使用的手段,而为了躲避杀毒软件的查杀,我们又不得不对 ...

  4. [Gin] 路由分组 Group 的内部实现 与 块空间 { } 的应用

    通过这篇 [Gin] 单文件极简 HTTP Server 流程分析 ( gin-gonic/gin ) 我们知道了 gin.go 中的 Engine 继承有 routergroup.go 中的 Rou ...

  5. WPF 基于 .NET 5 框架和 .NET 6 的 SDK 进行完全单文件发布

    本文来告诉大家如何基于 .NET 5 框架和 .NET 6 SDK 进行完全单文件发布,这是对 WPF 应用程序进行独立发布,生成的是完全单文件的方法 在之前的版本,尽管也是基于 .NET 5 框架的 ...

  6. WPF 引用 UWP 控件 不打包为 MSIX 分发的方法

    按照微软的官方文档,大部分的文档都会说如果用了 XAML Islands 等技术的时候,需要新建一个打包项目,将 WPF 应用打包为 msix 等才可以进行分发和使用.但是实际上不打包也可以,此时可以 ...

  7. 一文搞懂drag&drop浏览器拖放功能的实现

    拖放功能,即将一个元素从一个区域,通过拖拽,放置到另一个区域.常见的应用是将文件或图片从一个区域,拖放到另一个区域.中文常常把这表述成拖拽,实际上拖拽的描述并不准确,应该叫拖放,因为drag事件和dr ...

  8. .NET开源、功能强大、跨平台的图表库 - LiveCharts2

    前言 今天大姚给大家分享一个.NET开源(MIT License).功能强大.简单.灵活.跨平台的图表.地图和仪表库:LiveCharts2.   项目介绍 LiveCharts2是一个.NET开源. ...

  9. ruby执行周期性任务 whenever

    ruby执行周期性任务 下面看看怎么将任务写入cron服务. $ whenever #不带参数的whenever会显示转换程cron任务的代码,不写入cron任务表 $ whenever -w #写入 ...

  10. Calcite sql2rel 过程

    sql2rel的过程是将SqlNode 转化成RelNode的过程 在 SqlToRelConverterTest中添加样例测试 @Test void testScan() { String sql ...