level=error msg="Running error: context loading failed: failed to load program with go/packages

level=error msg="Running error: context loading failed: failed to load program with go/packages: go [list -e -json -compiled=true -test=true -export=false -deps=true -find=false -mod=vendor -- ./...]: exit status 1: build flag -mod=
vendor only valid when using modules\n"

解决方法:

开启go module

set GO111MODULE= on  //windows
export GO111MODULE=on  //linux

延申阅读:golang包管理解决之道——go modules初探(https://www.cnblogs.com/apocelipes/p/9534885.html)

你可能感兴趣的:(Golang)