Can someone please help me
I am facing an issue in github
So when we do the go get -d command on the goes to eleven its created that github dir in package dir not in source
pleae help me how can this issue be fixed
Can someone please help me
I am facing an issue in github
So when we do the go get -d command on the goes to eleven its created that github dir in package dir not in source
Which issue? Today with modules being the default that’s kind of expected.
Okay so what i do is i open my gitbash terminal and i make tue directory bin pkg and src
Then in src i used the command go get -d and the resource i want to get and the path i want is src
When it gets downloaded its saved in package file not the source one
And everytime is use go get in documents\goworkplace\src
Its supposed to get that file in source
But its getting it in documents\goworkplace\pkg
Now i am new to this coding thing so cant get past this problem
And the vidoe that i was watching got the file in src only
Today, as go modules are the default, go get
usually just downloads the sources and adds the module to go.mod
.
Downloading to $GOPATH/src
is legacy behaviour that is disabled by default in modern go.
You should search yourself a more modern tutorial that adheres to the module idioms.
Can you suggest me some videos and most of them uses mac i have windows so
I have downloaded these gitbash and goland
I have no clue about videos. I prefer learning from official documentation.
Okay will do that thanks a lot for the help
Will try enabling $GOPATH\src and see of that solves the issue
Wrong direction
Sorry didn’t get you
You should be figuring out how to work with go modules, not how to revert to the obsolete workflow.
So this i should not be concentrating on directly the go modules correct
Do concentrate directly on go modules. GOPATH is pre-module tech. Avoid it.
Okay thanks a lot
One more thing can you give me suggestions on which videos to reffer as i am new to this coding thing
I don’t like videos. I’d rather read
Okay ill check the go documentation.
Anyway thanks for the help
Can you suggest me somethings as i am new to this coding thing amd have started directly from go
This was the first hit from google. It looks like a reasonable start How to Use Go Modules | DigitalOcean