#go.mod

45 messages · Page 1 of 1 (latest)

zenith cipher
#

I've touched something in the software and my go.mod file has turned orange with no color in the writing, how can I get it back to the way it was?

uncut kindle
#

what file type does it say it is in the bottom right

zenith cipher
#

how to see that ?

uncut kindle
#

it’s listed as XML

#

hit that area, then reselect the file association. i’m not 100% sure what it’ll be called off the top of my head but there’s a search bar so you should be able to find it

zenith cipher
#

I wish it was like before, like this:

uncut kindle
#

i understand; was there anything in my suggestion that was unclear?

zenith cipher
#

What should I do?

uncut kindle
#

see where it says XML in the bottom right?

zenith cipher
#

yes

uncut kindle
#

have you tried this? what happens?

zenith cipher
uncut kindle
#

ok, so typing “go” might be a good start

#

it’s a search bar

#

i’m on my phone and can’t find the exact name, but i believe in you 🙂

zenith cipher
#

yes, that's what I did, but how to get back to the start

uncut kindle
#

well it’s not a go file, was there nothing that resembled “go module” in that search bar?

zenith cipher
#

no there's only language go

#

I know there was this icon, so I tested everything that was close, but it didn't work.

uncut kindle
#

this is what i see when i search

#

do you have the Go extension installed inside WSL?

zenith cipher
#

ah, I thought you were talking about the languages at bottom right

uncut kindle
zenith cipher
#

when I click on the button on the bottom right I get only this

uncut kindle
#

hmm, you are in restricted mode (see the bottom left), i think that may prevent extensions from running

#

e.g., the Go extension, which provides Go module support

zenith cipher
#

hmm maybe

#

I was in restraint mode and had managed to do the thing in the first place.

uncut kindle
#

if you do CTRL+SHIFT+P and type "install", do you see "Go: Install/Update Tools" as an option?

zenith cipher
#

no

uncut kindle
#

ok, then it appears to me that your Go extension is not working

#

that’s the root issue here

#

can you show what the extension looks like in the extensions tab?

zenith cipher
uncut kindle
#

ok, do you see where it says “This extension has been disabled because the current workspace is not trusted”

zenith cipher
#

ah I see and how to fix it

uncut kindle
#

you can try hitting enable there, but the fundamental solution is to trust the folder and stop running in restricted mode

zenith cipher
#

I'm giving up, I'll see tomorrow with my teacher, thanks for your help.

jaunty vault
#

I think it can be easily resolved if you delete the file, and recreate it by running go mod init piscine

After that, add the package again by running:

go get github.com/01-edu/z01 again

Note that you must be in the right directory when you run this.

The issue was that the file name seems incorrect or there is some white space characters.

uncut kindle
#

no, that’s clearly not the issue

#

as we established, the extension isn’t running

#

even if the file wasn’t correctly formatted and broke the file type detection, you could still manually change the file association