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/gofmt: flag documentation #31228

Open
Konstantin8105 opened this issue Apr 3, 2019 · 4 comments
Open

cmd/gofmt: flag documentation #31228

Konstantin8105 opened this issue Apr 3, 2019 · 4 comments

Comments

@Konstantin8105
Copy link
Contributor

@Konstantin8105 Konstantin8105 commented Apr 3, 2019

Documentation is not same:

gofmt -h
usage: gofmt [flags] [path ...]                                  -cpuprofile string                                                   write cpu profile to this file                           -d    display diffs instead of rewriting files                 -e    report all errors (not just the first 10 on different lines)                                                            -l    list files whose formatting differs from gofmt's         -r string                                                            rewrite rule (e.g., 'a[b:len(a)] -> a[b:]')              -s    simplify code                                            -w    write result to (source) file instead of stdout

And https://golang.org/cmd/gofmt/

@Konstantin8105
Copy link
Contributor Author

@Konstantin8105 Konstantin8105 commented Apr 3, 2019

Also see go doc cmd/gofmt

@DylanMeeus
Copy link

@DylanMeeus DylanMeeus commented Apr 3, 2019

It seems to me that the documentation needs to be updated to match the output from gofmt -h. Rather than having gofmt -h updated to reflect the documentation?

If that's the case, is it OK if I open a PR for this by altering the doc.go in cmd/gofmt?
So I have something small to contribute 😅

@Konstantin8105
Copy link
Contributor Author

@Konstantin8105 Konstantin8105 commented Apr 3, 2019

Us I understood, gofmt -h is correct, but not correct on other places.
Feel free for contribute.

@FiloSottile FiloSottile changed the title cmd/gofmt : flag documentation cmd/gofmt: flag documentation Apr 3, 2019
@andybons andybons added this to the Unplanned milestone Apr 3, 2019
@gopherbot
Copy link

@gopherbot gopherbot commented Apr 3, 2019

Change https://golang.org/cl/170679 mentions this issue: cmd/gofmt: have the doc.go match -h output

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
4 participants
You can’t perform that action at this time.