看到类似的报错信息,提示goroot配置问题,如何处理
来源:4-3 Iris框架入门---快速入门案例
hwkkevin
2020-06-25
main.go:6:2: package irisShop/web/controllers is not in GOROOT (D:\Go\src\irisShop\web\controllers)
Compilation finished with exit code 1
windows系统配置电脑go环境,运行beego项目是可以正常启动的,唯独老师说的这个项目启动报错
2回答
-
Cap
2020-06-25
课程里是没有使用go mod的,可以按照课程里的把代码放到go src下面试下。
00 -
hwkkevin
提问者
2020-06-25
执行命令
go mod tidy
main imports
irisShop/web/controllers: package irisShop/web/controllers is not in GOROOT (D:\Go\src\irisShop\web\controllers)
main/repositories imports
IrisShop/datamodels: package IrisShop/datamodels is not in GOROOT (D:\Go\src\IrisShop\datamodels)
main/services imports
IrisShop/repositories: package IrisShop/repositories is not in GOROOT (D:\Go\src\IrisShop\repositories)
main/web/controllers imports
irisShop/repositories: package irisShop/repositories is not in GOROOT (D:\Go\src\irisShop\repositories)
main/web/controllers imports
irisShop/services: package irisShop/services is not in GOROOT (D:\Go\src\irisShop\services)
00
相似问题