]> Cypherpunks.ru repositories - gostls13.git/commit
[dev.regabi] cmd/compile: finish cleanup of Flag initialization
authorRuss Cox <rsc@golang.org>
Mon, 16 Nov 2020 06:15:33 +0000 (01:15 -0500)
committerRuss Cox <rsc@golang.org>
Wed, 25 Nov 2020 16:18:28 +0000 (16:18 +0000)
commit756661c82a2ffa285c16f36d5a5290e057fa75bd
treeb7903a1b7ec75b045662e5b9d521df505c606101
parent259fd8adbb15f2a44433c7b8b40a35e97992b345
[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>
src/cmd/compile/fmtmap_test.go
src/cmd/compile/internal/gc/flag.go
src/cmd/compile/internal/gc/main.go