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: unused function addModFlag in internal/modcmd/mod.go #37189

Closed
perillo opened this issue Feb 12, 2020 · 3 comments · Fixed by sthagen/golang-go#150
Closed

cmd/go: unused function addModFlag in internal/modcmd/mod.go #37189

perillo opened this issue Feb 12, 2020 · 3 comments · Fixed by sthagen/golang-go#150
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@perillo
Copy link
Contributor

perillo commented Feb 12, 2020

In internal/modcmd/mod.go there is a function addModFlags that is never used:

func addModFlags(cmd *base.Command) {
        cmd.Flag.StringVar(&cfg.ModFile, "modfile", "", "")
}

The flag is set in the internal.work.AddModCommonFlags function, so it was probably not removed in https://golang.org/cl/202564.

@jayconrod jayconrod self-assigned this Feb 12, 2020
@gopherbot
Copy link

Change https://golang.org/cl/219197 mentions this issue: cmd/go/internal/modcmd: remove dead function addModFlag

@jayconrod
Copy link
Contributor

Thanks. CL 219197 will remove this.

@bcmills bcmills added the NeedsFix The path to resolution is known, but the work has not been done. label Feb 12, 2020
@bcmills bcmills added this to the Go1.15 milestone Feb 12, 2020
@perillo
Copy link
Contributor Author

perillo commented Feb 12, 2020

Thanks.

By the way; I find it unusual that no tool reported this problem. Non even staticcheck -unused.whole-program .

@golang golang locked and limited conversation to collaborators Feb 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants