Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: mention go get in go help mod #44726

Open
bukowa opened this issue Mar 2, 2021 · 2 comments
Open

cmd/go: mention go get in go help mod #44726

bukowa opened this issue Mar 2, 2021 · 2 comments

Comments

@bukowa
Copy link

@bukowa bukowa commented Mar 2, 2021

What version of Go are you using (go version)?

$ go version
go version go1.16

Does this issue reproduce with the latest release?

Yes

What did you do?

I were working with a module using command go mod; i expected that i can update dependency with commands:
go mod update -u <dependency>
go mod update <dependency>@commit

What did you expect to see?

I expected for this to work.
I expected for this to show in go help mod:

Usage:

        go mod <command> [arguments]

The commands are:

        download    download modules to local cache
        edit        edit go.mod from tools or scripts
        graph       print module requirement graph
        init        initialize new module in current directory
        tidy        add missing and remove unused modules
        vendor      make vendored copy of dependencies
        verify      verify dependencies have expected content
        why         explain why packages or modules are needed

What did you see instead?

After asking a question regarding this topic on golang slack channel i received help from Tim Heckman that stated:

yeah, the choice was made to keep it as go get so all the existing Gophers wouldn't need to relearn the command(s).
yeah, that was kept for historical purposes... that was how dependencies have always been gotten.

He nicely explained to me that i have to use:

go get <dependency>@commit
go get -u <dependency>

Which for me is confusing - i expected that subcommand to be related to go mod but - it's not in the help of that command - while it's clearly related to modules.

@bukowa bukowa changed the title subcommands related to "go mod" are not categorized under its "go help mod" subcommands related to "go mod" are not categorized under its "go help mod" ("go get") Mar 2, 2021
@go101
Copy link

@go101 go101 commented Mar 2, 2021

Do you mean to use go mod update to depreciate go get? Not a bad idea IMO.

@bukowa
Copy link
Author

@bukowa bukowa commented Mar 2, 2021

I don't know about depreciating go get but because that command is related to modules - i believe it should be included in go mod

@seankhliao seankhliao changed the title subcommands related to "go mod" are not categorized under its "go help mod" ("go get") cmd/go: mention go get in go help mod Mar 2, 2021
@bcmills bcmills added this to the Backlog milestone Mar 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants