Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    ecarter202
    @ecarter202
    This is after having removed 1.13 and installing 1.14
    ecarter202
    @ecarter202
    Any idea the solution? I'm thinking there is a better way than just changing the directory / file permissions...
    Pab Akihabara
    @AkihabaraPab_twitter
    hi guys. i want to ask a question. im fairly new to golang and i am studying it. Right now i came across with something weird. i cannot understand it. When i copy elements from one slice to another with the copy function and i assign it to a variable lets say n, if i print out the value of the variable n, it shows how many elements have been copied. How is this possible?
    Zigmas Slusnys
    @slushnys
    Greetings everyone, before creating a bug report I wanted to ask if anyone's experiencing the same or maybe know of an existing bug report where go extension just stops highlighting any code until the VSCode gets reloaded? I'm experiencing this quite often when writing code.
    00sivan
    @00sivan
    Does anyone know how to configure the left panel to NOT open when selecting "run without debugging?" This is only happening with Go.
    Steven Johnson
    @stevenj
    Anyone know how to fix this error:
    Your workspace is misconfigured: go [-e -json -compiled=true -test=true -export=false -deps=true -find=false -- ./]: exit status 1: go: cannot find main module, but found .git/config in /home/steven/Development/privacy-hero/adapter-auth-lambda to create a module there, run: go mod init . Please see https://github.com/golang/tools/blob/master/gopls/doc/troubleshooting.md for more information or file an issue (https://github.com/golang/go/issues/new) if you believe this is a mistake.
    Neo Liang
    @neo-liang-sap
    Hi, i'm on MacOS 10.15.4, after upgrading to VS.Code 1.43.2, Go extension never works for go to definitions or other go to functions in my code, i tried to downgrade to earlier version of Go extension but didn't help, anyone also mets this problem?
    Cristiano Degiorgis
    @crixo
    Hi, I'm using vscode-go extension 0.13.1 w/ VSCode 143.2 on MacOs10.13.6. I have a git repo with multiple folder at root level each of those w/ an independent go application plus other folder w/ infrastructure matters (eg. kind setup, docs...). If I open an instance of VScode against a specific folder everything works fine but if I open a VScode instance agianst the repo root and I'm trying to work on a specific project/folder, autocompletion, navigation, error checking do not work. Is there a way/settings to have same experience I got when I work with a single folder?
    Steven Johnson
    @stevenj
    @crixo I have a similar issue. I think the answer is no. I had just one go project in a subfolder, and i kept getting "Your workspace is misconfigured" errors and nothing worked properly.
    At least in my case, i had to move my main.go and go.mod out of the subdirectory to the root to get it working normally again.
    With multiple go subfolders i think you may have trouble.
    Cristiano Degiorgis
    @crixo
    @stevenj I tried also using the workspace feature: I opened the root in VScode and I added a workspace adding subfolders into the workspace. A little better then simply opening the root by itslef, but not as smooth as an instance x each subfolder
    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?