mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[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:
parent
259fd8adbb
commit
756661c82a
3 changed files with 292 additions and 219 deletions
|
|
@ -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": "",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue