一直报错cannot be used without a working tree.
C:\Users\Administrator>go get -u github.com/visualfc/gocode # cd E:\dev_tools\go1.15\mygo_path\src\golang.org\x\mod; git submodule update --init --recursive fatal: E:/dev_tools/Git/mingw64/libexec/git-core\git-submodule cannot be used without a working tree. package golang.org/x/mod/modfile: exit status 1
知道切换为国内源
C:\Users\Administrator>go env -w ?GO111MODULE=on
C:\Users\Administrator>go env ?-w GOPROXY=https://goproxy.cn,direct
C:\Users\Administrator> C:\Users\Administrator> C:\Users\Administrator>go get -u github.com/visualfc/gocode go: downloading github.com/visualfc/gocode v1.3.2 go: github.com/visualfc/gocode upgrade => v1.3.2 go: downloading github.com/visualfc/gotools v1.3.4 go: downloading github.com/visualfc/fastmod v1.3.7 go: golang.org/x/tools upgrade => v0.1.7 go: golang.org/x/mod upgrade => v0.5.1 go: golang.org/x/xerrors upgrade => v0.0.0-20200804184101-5ec99f83aff1 go: github.com/visualfc/gotools upgrade => v1.3.6 go: downloading github.com/visualfc/gotools v1.3.6 go: downloading golang.org/x/tools v0.1.7 go: downloading golang.org/x/mod v0.5.1
|