Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
459 views
in Technique[技术] by (71.8m points)

go - Error in installing golang plug-ins in vscode

I wanted to install some golang plug-ins for VSCode in Linux. After installing go and vscode extensions, VScode prompted to install some go extensions. It failed with errors. Looking into the logs I noticed that

go get -v github.com/sqs/goreturns

returns this error message:

go/internal/gcimporter
# go/internal/gcimporter
/usr/local/go/src/go/internal/gcimporter/support.go:16:6: errorf redeclared in this block
        previous declaration at /usr/local/go/src/go/internal/gcimporter/bimport.go:165:36
/usr/local/go/src/go/internal/gcimporter/support.go:20:7: deltaNewFile redeclared in this block
        previous declaration at /usr/local/go/src/go/internal/gcimporter/bimport.go:300:23
/usr/local/go/src/go/internal/gcimporter/support.go:23:6: fakeFileSet redeclared in this block
        previous declaration at /usr/local/go/src/go/internal/gcimporter/bimport.go:335:6
/usr/local/go/src/go/internal/gcimporter/support.go:28:23: (*fakeFileSet).pos redeclared in this block
        previous declaration at /usr/local/go/src/go/internal/gcimporter/bimport.go:340:6
/usr/local/go/src/go/internal/gcimporter/support.go:59:2: fakeLines redeclared in this block
        previous declaration at /usr/local/go/src/go/internal/gcimporter/bimport.go:371:2
/usr/local/go/src/go/internal/gcimporter/support.go:60:2: fakeLinesOnce redeclared in this block
        previous declaration at /usr/local/go/src/go/internal/gcimporter/bimport.go:372:2
/usr/local/go/src/go/internal/gcimporter/support.go:63:6: chanDir redeclared in this block
        previous declaration at /usr/local/go/src/go/internal/gcimporter/bimport.go:574:21
/usr/local/go/src/go/internal/gcimporter/support.go:78:5: predeclared redeclared in this block
        previous declaration at /usr/local/go/src/go/internal/gcimporter/bimport.go:972:5
/usr/local/go/src/go/internal/gcimporter/support.go:124:6: anyType redeclared in this block
        previous declaration at /usr/local/go/src/go/internal/gcimporter/bimport.go:1018:6
/usr/local/go/src/go/internal/gcimporter/support.go:126:18: anyType.Underlying redeclared in this block
        previous declaration at /usr/local/go/src/go/internal/gcimporter/bimport.go:1020:6
/usr/local/go/src/go/internal/gcimporter/support.go:126:18: too many errors

I looked up these questions, but did not find my answer:

VS Code can't install the Go tools

VS Code can't install the Go tools

Downloading and installing Visual Studio Code Go dependencies

I appreciate any advice.

ps. this is my first question here, so apology in advance if it miss required info.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...