go:cannot find main module;see 'go help modules'

执行:

go mod init 【module名】

原文地址:https://www.cnblogs.com/lishidefengchen/p/13801019.html