提示:
dep init failed: unable to determine the import path for the root project C:\DevEnv\Go\GOPATH\src\myproject: C:\DevEnv\Go\GOPATH\src\myproject is not within any GOPATH/src
环境:
> echo %GOPATH%
> C:\DevEnv\Go\GOPATH\src\myproject;C:\DevEnv\Go\GOPATH
解决:
set GOPATH=C:\DevEnv\Go\GOPATH
或者在Goland下配置 GOPATH为 C:\DevEnv\Go\GOPATH
注意: 项目要放在**%GOPATH%/src** 下
参考: https://github.com/golang/dep/issues/911