Closed Nexushunter closed 3 years ago
Thanks @Nexushunter
@hyangah Can you please help review this?
Having go.mod file is a good thing. (With go1.16, the go project won't build without it).
But note: even with go.mod
in this repo, -u
shouldn't be used - -u
flag in module mode has special meaning and end users are not supposed to use that flag. The right fix would be to update the README.md file.
go version < 1.12 (do we care?):
go get -u github.com/ramya-rao-a/go-outline
1.12 <= go version < 1.16 (this is what vscode go is doing now for go1.12+), install in Module mode:
cd $(mktemp -d)
go mod init work
go get github.com/ramya-rao-a/go-outline
After go 1.16, use the new go install <tool path>@latest
command:
go install github.com/ramya-rao-a/go-outline@latest
I don't think missing go.mod
is the cause of #9, and I am not sure if the bug is still reproducible.
Thanks @hyangah
Do you recommend merging this PR in its current state?
This PR itself looks fine except the title - it should be just 'add go.mod'.
And we are ok with go.sum being added as well?
Yes, go.sum needs to be checked in too.
Thanks @Nexushunter & @hyangah!
With the move to mod, this repo needs to be updated.
Currently, when using VSCode it fails to install with option
-u
(The vscode snippet was just a go get -v so 🤷🏻 ).This adds a mod file to try and correct that.
@ramya-rao-a This should solve #9 but I don't know how to test that (I use Goland for personal projects and collab with VSCode at work).