[dev.regabi] cmd/compile: finish cleanup of Flag initialization

Now that all flags are in a struct, use struct tags to set the usage messages
and use reflection to walk the struct and register all the flags.

Also move some flag usage back into main.go that shouldn't
come with the rest of flag.go into package base.

Change-Id: Ie655582194906c9ab425c3d01ad8c304bc49bfe0
Reviewed-on: https://go-review.googlesource.com/c/go/+/271668
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
Russ Cox 2020-11-16 01:15:33 -05:00
parent 259fd8adbb
commit 756661c82a
3 changed files with 292 additions and 219 deletions

View file

@ -168,6 +168,7 @@ var knownFormats = map[string]string{
"map[int64]uint32 %v": "",
"math/big.Accuracy %s": "",
"reflect.Type %s": "",
"reflect.Type %v": "",
"rune %#U": "",
"rune %c": "",
"rune %q": "",