Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Steven Johnson
    @stevenj
    @crixo i messed with the workspace as well, but without joy.
    Anyone meets this problem when debug test? run test works though
    Yang Hau
    @HowJMay
    Hi I am using export to change the env var of GOROO, but the following message still show up all the time. What should I do?
    You are neither in a module nor in your GOPATH. Please see https://github.com/golang/go/wiki/Modules for information on how to set up your Go project.
    matrixbot
    @matrixbot
    NobbZ gitter_howjmay , how do you start vscode? Also, GOROOT is where go is installed, you probably want to change GOPATH.
    Yang Hau
    @HowJMay
    Oh I am using a cloned local compiled golang source file, that is why I want to change GOROOT to the current file
    matrixbot
    @matrixbot
    NobbZ I think the plugin can't really cope with editing gos sources itself.
    Yang Hau
    @HowJMay
    Oh got it~ Thanks !
    Pirate
    @pirategopher
    Hey there,
    Here is a community for golang developers.Passionate golang developers and interested people join in.We can also collect some good resources for newbies to learn go and also have some interesting discussions.
    t.me/golangglobal
    Pab Akihabara
    @AkihabaraPab_twitter
    i run a script on linux which includes some go code and i get an error stating that it fails to normalise the path because it cant find go in $path. the command that fails is GO111MODULE = go mod vendor
    • =on ....
    Rajeshkumar Reddy
    @technitos
    I have installed a fresh installation of Go 1.11.5, VSCode on Windows WSL. One of the plugin is not installing and showing some weird error
    go.toolsGopath setting is not set. Using GOPATH /home/rajesred/gows
    Installing 1 tool at /home/rajesred/gows/bin in module mode.
      gopls
    
    Installing golang.org/x/tools/gopls FAILED
    
    1 tools failed to install.
    
    gopls:
    Error: Command failed: /usr/local/go/bin/go get -v golang.org/x/tools/gopls
    Fetching https://golang.org/x/tools/gopls?go-get=1
    Parsing meta tags from https://golang.org/x/tools/gopls?go-get=1 (status code 200)
    get "golang.org/x/tools/gopls": found meta tag get.metaImport{Prefix:"golang.org/x/tools", VCS:"git", RepoRoot:"https://go.googlesource.com/tools"} at https://golang.org/x/tools/gopls?go-get=1
    get "golang.org/x/tools/gopls": verifying non-authoritative meta tag
    Fetching https://golang.org/x/tools?go-get=1
    Parsing meta tags from https://golang.org/x/tools?go-get=1 (status code 200)
    golang.org/x/tools/internal/lsp/source
    # golang.org/x/tools/internal/lsp/source
    /home/rajesred/gows/pkg/mod/golang.org/x/tools@v0.0.0-20200316194252-fafb6e2e8a4a/internal/lsp/source/completion.go:637:21: file.LineStart undefined (type *token.File has no field or method LineStart)
    Rajeshkumar Reddy
    @technitos
    go env
    GOARCH="amd64"
    GOBIN=""
    GOCACHE="/home/rajesred/.cache/go-build"
    GOEXE=""
    GOFLAGS=""
    GOHOSTARCH="amd64"
    GOHOSTOS="linux"
    GOOS="linux"
    GOPATH="/home/rajesred/gows"
    GOPROXY=""
    GORACE=""
    GOROOT="/usr/local/go"
    GOTMPDIR=""
    GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
    GCCGO="gccgo"
    CC="gcc"
    CXX="g++"
    CGO_ENABLED="1"
    GOMOD=""
    CGO_CFLAGS="-g -O2"
    CGO_CPPFLAGS=""
    CGO_CXXFLAGS="-g -O2"
    CGO_FFLAGS="-g -O2"
    CGO_LDFLAGS="-g -O2"
    PKG_CONFIG="pkg-config"
    GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build354948885=/tmp/go-build -gno-record-gcc-switches"
    Any help is highly appreciated
    Thanks in advance
    coreyog
    @coreyog

    I'm running into a permissions problem that I believe originates from the vscode extension. When I'm NOT using the language server and I save my file, I get the following error:

    go build runtime/cgo: copying /Users/cogburn/Library/Caches/go-build/3d/3dd639289c0a9344f947ca3402af02519ca5404d022f983bf14dc5ee8a31be24-d: open /usr/local/go/pkg/darwin_amd64/runtime/cgo.a: permission denied

    In the output of the Go extension, I see the issue:

    Starting building the current package at /Users/cogburn/src/goprojects/src/hellokube
    /Users/cogburn/src/goprojects/src/hellokube>Finished running tool: /usr/local/go/bin/go build -i -o /var/folders/36/t5tp3n552gj71zsh8949yb6m0000gn/T/vscode-govxb5M4/go-code-check hellokube
    go build runtime/cgo: copying /Users/cogburn/Library/Caches/go-build/3d/3dd639289c0a9344f947ca3402af02519ca5404d022f983bf14dc5ee8a31be24-d: open /usr/local/go/pkg/darwin_amd64/runtime/cgo.a: permission denied

    go build -i will try to install every imported package. This is running into a permission issue trying to update standard library pre-built code, i.e. runtime/cgo because it's not being run with sudo. I don't think the -i parameter is required here.
    Omkara
    @0mkara
    Hi,
    How to configure vscode to insert spaces in { [mycode] } ?
    matrixbot
    @matrixbot
    NobbZ Push the space-bar?
    NobbZ Or what exactly do you mean?
    Omkara
    @0mkara
    vscode-go autoformats the code. Now I am used to see code in this format { [mycode] } and vscode-go extension is formatting it to {[mycode]}
    I could not find a way to configure this behaviour. If you know, please suggest. @matrixbot
    matrixbot
    @matrixbot
    NobbZ The plugin uses the go formatter, which is not configurable and quasi standard in the go community.
    NobbZ Well, not quasi... As it is part of go, it is standard
    Omkara
    @0mkara
    @matrixbot is there any configurable formatter ?
    matrixbot
    @matrixbot
    NobbZ Not that I'm aware of.
    NobbZ Also @matrixbot is a bridge account, used by thousands of people.
    Omkara
    @0mkara
    Yeah just read your github profile. :thumbsup:
    zenchan
    @zenchan
    vscode-go extension startup false. Can anyone help me?
    Version: 1.44.1 (system setup)
    Commit: a9f8623ec050e5f0b44cc8ce8204a1455884749f
    Date: 2020-04-11T01:48:12.622Z
    Electron: 7.1.11
    Chrome: 78.0.3904.130
    Node.js: 12.8.1
    V8: 7.8.279.23-electron.0
    OS: Windows_NT x64 6.1.7601
    vscode-go version is 0.13.1
    a-gamer
    @a-gamer
    i have install additional vs code in partition d not and start hello.py for first time but whene restart pc and start app again get error GOPATH not found
    not partition c *
    zenchan
    @zenchan
    image.png
    image.png
    Matt S
    @matts80
    vscode on linux - when i choose Go: Test file I'm not seeing any tests running in the terminal, output, or debug console tab. am i missing a dependency?
    ChocoPowwwa
    @chocopowwwa
    screenshot-2020-04-22-10:00:18.png
    Any of you guys experience dangling error message like that?
    ChocoPowwwa
    @chocopowwwa
    @matts80 I also use vscode on linux, i run the Go: Test FIle and it works fine for me, the output is in the output tab and make sure Go Tests is selected at the dropdown menu
    exp_mb
    @dev8085
    image.png
    build failing ?
    image.png
    varunair
    @varunair
    Even I've been getting the 'build failing' message along with 2 pop up messages on the bottom right that say 'couldn't start client gopls' and 'unsupported URI scheme: (gopls only supports file URIs)'. I'm new to this and honestly I don't completely understand what this means....could anyone please help me with this. Thanks.
    Ken Xuan
    @pakwah
    Somehow the intellisense for the go extension in VSCode has stopped working for me? Not sure what has changed...
    GOPATH set to ~/go and GOROOT set to /usr/local/go
    dbhojwan
    @dbhojwan
    why am i not able to browse the code
    go to definition is not working
    @neo-liang-sap yes i have the same problem now
    what is the solution.
    himanshusharma-git
    @himanshusharma-git
    hello everyone .... i found a little bug today while playing around with visual code.