{"action":"closed","issue":{"url":"https://api.github.com/repos/golang/go/issues/12544","labels_url":"https://api.github.com/repos/golang/go/issues/12544/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/12544/comments","events_url":"https://api.github.com/repos/golang/go/issues/12544/events","html_url":"https://github.com/golang/go/issues/12544","id":105464239,"number":12544,"title":"cmd/go: document 'go generate' flags -n -v -x","user":{"login":"shurcooL","id":1924134,"avatar_url":"https://avatars.githubusercontent.com/u/1924134?v=3","gravatar_id":"","url":"https://api.github.com/users/shurcooL","html_url":"https://github.com/shurcooL","followers_url":"https://api.github.com/users/shurcooL/followers","following_url":"https://api.github.com/users/shurcooL/following{/other_user}","gists_url":"https://api.github.com/users/shurcooL/gists{/gist_id}","starred_url":"https://api.github.com/users/shurcooL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shurcooL/subscriptions","organizations_url":"https://api.github.com/users/shurcooL/orgs","repos_url":"https://api.github.com/users/shurcooL/repos","events_url":"https://api.github.com/users/shurcooL/events{/privacy}","received_events_url":"https://api.github.com/users/shurcooL/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/golang/go/labels/Documentation","name":"Documentation","color":"aaffaa"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/24","html_url":"https://github.com/golang/go/milestones/Go1.6","labels_url":"https://api.github.com/repos/golang/go/milestones/24/labels","id":1096159,"number":24,"title":"Go1.6","description":"","creator":{"login":"josharian","id":67496,"avatar_url":"https://avatars.githubusercontent.com/u/67496?v=3","gravatar_id":"","url":"https://api.github.com/users/josharian","html_url":"https://github.com/josharian","followers_url":"https://api.github.com/users/josharian/followers","following_url":"https://api.github.com/users/josharian/following{/other_user}","gists_url":"https://api.github.com/users/josharian/gists{/gist_id}","starred_url":"https://api.github.com/users/josharian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josharian/subscriptions","organizations_url":"https://api.github.com/users/josharian/orgs","repos_url":"https://api.github.com/users/josharian/repos","events_url":"https://api.github.com/users/josharian/events{/privacy}","received_events_url":"https://api.github.com/users/josharian/received_events","type":"User","site_admin":false},"open_issues":85,"closed_issues":490,"state":"open","created_at":"2015-05-05T02:39:06Z","updated_at":"2015-12-17T17:00:14Z","due_on":"2016-01-31T08:00:00Z","closed_at":null},"comments":3,"created_at":"2015-09-08T20:38:14Z","updated_at":"2015-12-17T17:00:14Z","closed_at":"2015-12-17T17:00:14Z","body":"Looking at https://tip.golang.org/cmd/go/#hdr-Generate_Go_files_by_processing_source right now:\r\n\r\n> Usage:\r\n>\r\n> ```\r\n> go generate [-run regexp] [file.go... | packages]\r\n> ```\r\n\r\nHowever, at the bottom it mentions:\r\n\r\n> It also accepts the standard build flags -v, -n, and -x. The -v flag prints the names of packages and files as they are processed. The -n flag prints commands that would be executed. The -x flag prints commands as they are executed.\r\n\r\nThe usage line should be updated to mention those additional flags:\r\n\r\n```diff\r\n-go generate [-run regexp] [file.go... | packages]\r\n+go generate [-v] [-n] [-x] [-run regexp] [file.go... | packages]\r\n```\r\n\r\nOther commands have their usage complete and do not skip -n and -x flags that are available, for example:\r\n\r\n```\r\ngo clean [-i] [-r] [-n] [-x] [build flags] [packages]\r\ngo fmt [-n] [-x] [packages]\r\ngo tool [-n] command [args...]\r\ngo vet [-n] [-x] [build flags] [packages]\r\ngo get [-d] [-f] [-fix] [-insecure] [-t] [-u] [build flags] [packages]\r\n```\r\n\r\nIt seems -v is never included even if available, so maybe it's most consistent to do:\r\n\r\n```\r\ngo generate [-n] [-x] [-run regexp] [file.go... | packages]\r\n```"}}