请问vscode说找不到main module是怎么回事?

来源:2-1 变量定义

慕粉329807310

2020-09-21

如图,vscode说找不到main module
go: cannot find main module; see ‘go help modules’
图片描述

写回答

1回答

慕粉329807310

提问者

2020-09-21

Fixed by running the following command in terminal. "learngo" is a module name
$go mod init learngo

1
0

Google资深工程师深度讲解Go语言 由浅入深掌握Go语言

语法+分布式爬虫实战 为转型工程师量身打造

5995 学习 · 1909 问题

查看课程