Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Marc Chiarini
    @chiamarc
    Hey folks, longtime computer scientist, short time developer here. Using vscode for a couple months and dealing with excruciatingly slow "go to type definition" and other peek operations, or "No definition found" problems for certain go packages. Does anyone have an idea what I'm missing?
    Hangfish
    @Sky2hawkZ

    Is there a way to get verbose syntax support for the vscode plugin?

    A course I'm following get's an error message about redeclaration of a function, along with a notice about the previous declaration along with the line number and line position of the said declaration, while I'm only getting the notice that x redeclared in this block exists by the compiler.

    Asarew
    @Asarew
    I have a very anoying/weird issue. I have multiple folders in my workspace where only 1 folder is a golang project. But the vs-code golang extension creates a go.mod file in every folder, that wouldn't be a big issue if i could delete the file. But the go.mod file keeps on coming back immediately after i deleted it :(
    Does anybody have an idea how to fix this? Or how to disable the golang extension for specific folders inside my workspace?
    varianone
    @varianone
    Hey folks, is there a way to set custom launch parameters when running a single test using "debug test" which is above the test function? I would like to pass the maxStringLen parameter to delve when using this mode. I managed to create a custom launch config for the test method and run it using the regular launch option, but cant find a way to provide those custom settings when using the "debug test" above the function in my test file.
    Sandip Bhattacharya
    @sandipb
    Is there a way I can set an environment variable for Go tools? I don’t want to launch vscode from a terminal, and I want to set GO111MODULE=off for gopls and other tools on a per workspace basis
    Sandip Bhattacharya
    @sandipb
    never mind. Found out:
            "go.toolsEnvVars": {
                "GO111MODULE": "off"
            },
    Jonny
    @jonnylangefeld
    I'm sorry, maybe that's trivial, but I can't get the go code completion to run. I have installed the extension, it prompted me to install all the tools, it did install all the tools and it said All tools successfully installed. You are ready to Go :).. The setting "go.useLanguageServer": true is set.
    Now if I'm in a go file, I'd expect if I start typing fmt. that I get all the functions in the package recommended. But nothing happens. What am i doing wrong?
    Jonny
    @jonnylangefeld
    I think I found it. I had go 1.14 installed, but the repository I was trying it out with was go 1.13. so the go.mod file always automatically included the go 1.14 line and that didn't work. Once everything is on the same version, it works
    Lawrence Xiao
    @LawrenceXiao5_twitter
    hi, I am trying to Go To Definition on a GO func, but it is not responding after I reset my remote-ssh extension in VS-Code today
    I could still do this yesterday
    burstman
    @burstman
    hello, any one can help me with vs code for go?
    image.png
    i m using ubuntu
    Norbert Melzer
    @NobbZ
    Looks as if you do not have permissions to write to ~/go/pkg or one of its parents.
    burstman
    @burstman
    haw can i let have permission?
    Norbert Melzer
    @NobbZ
    First check the permissions…
    Then you can use regular linux means to adjust them (chmod)
    Norbert Melzer
    @NobbZ
    Whats the permissions on ~/go and ~/go/pkg? (This assumes that holacus is your user)
    burstman
    @burstman
    yes
    matrixbot
    @matrixbot
    @NobbZ:matrix.org So your permissions are "yes"?
    burstman
    @burstman
    ah wait
    burstman
    @burstman
    drwxr-xr-x 3 root root 4096 مارس 9 12:05 /home/holacus/go
    matrixbot
    @matrixbot
    @NobbZ:matrix.org Why is that folder owned by root? chown -rv holacus:holacus ~/go to transfer ownership to your current user.
    burstman
    @burstman
    chown: invalid option -- 'r'
    have i put somthing wrong?
    matrixbot
    @matrixbot
    @NobbZ:matrix.org Oh, it is -R… And you need to sudo ;D
    burstman
    @burstman
    ok
    burstman
    @burstman
    drwxr-xr-x 3 holacus holacus 4096 مارس 9 12:05 /home/holacus/go
    matrixbot
    @matrixbot
    @NobbZ:matrix.org Looks a lot better, now vscode should install properly
    @NobbZ:matrix.org * Looks a lot better, now vscode should install the packages properly
    burstman
    @burstman
    thanks its working all packages are installed successfully . But can you explain me what was the problem at the beginning?
    matrixbot
    @matrixbot
    @NobbZ:matrix.org Your ~/go was owned by root, not sure how that could happen, unless you created it with sudo mkdir or similar
    burstman
    @burstman
    i have installet the go using apt install
    matrixbot
    @matrixbot
    @NobbZ:matrix.org That doesn't do anything in your home folder
    burstman
    @burstman
    ok thanks for help
    matrixbot
    @matrixbot
    @NobbZ:matrix.org At least, assuming that APT is done properly… I would not expect any package manager to create stuff in /home
    burstman
    @burstman
    i understand, and i dont think i have made it my self
    matrixbot
    @matrixbot
    @NobbZ:matrix.org Perhaps something else you did as root unconsciously?
    burstman
    @burstman
    may be
    matrixbot
    @matrixbot
    @NobbZ:matrix.org Don't worry, happens to all of us.
    burstman
    @burstman
    thanks for your answers
    matrixbot
    @matrixbot
    @NobbZ:matrix.org 👍️
    Xavier Thomas
    @sceptre12
    Hey does anyone ever have an issue saving Go "code" and the Go formatter in vscode is taking a long time to do a save
    Andrew Appleton
    @appleton
    Hello folks, I was planning to open an issue asking about semantic highlighting support for Go, and it pointed me here first. Does anyone know if this work is planned? I'd love to see an expanded set of syntax scopes available for Go!
    ecarter202
    @ecarter202
    I'm getting the following error: /usr/local/go/pkg/darwin_amd64/runtime/cgo.a: permission denied
    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.