aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/debug.go
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2021-09-17 10:07:41 -0400
committerAustin Clements <austin@google.com>2021-11-05 00:52:04 +0000
commit1c4cfd80109da81a2c6cf49b4d3ff49c45af8e03 (patch)
tree6f38b16f18e3b37f26f364b6278cf4ba88b339c6 /src/runtime/debug.go
parent0e5f287fde7b2cf11c8cffb7839f970a8f3e2f9b (diff)
downloadgo-1c4cfd80109da81a2c6cf49b4d3ff49c45af8e03.tar.xz
cmd/compile,cmd/internal/objabi: move -d flag parser to objabi
This moves and slightly generalizes the -d debug flag parser from cmd/compile/internal/base to cmd/internal/objabi so that we can use the same debug flag syntax in other tools. This makes a few minor tweaks to implementation details. The flag itself is now just a flag.Value that gets constructed explicitly, rather than at init time, and we've cleaned up the implementation a little (e.g., using a map instead of a linear search of a slice). The help text is now automatically alphabetized. Rather than describing the values of some flags in the help text footer, we simply include it in the flags' help text and make sure multi-line help text renders sensibly. For #48297. Change-Id: Id373ee3b767e456be483fb28c110d025149be532 Reviewed-on: https://go-review.googlesource.com/c/go/+/359956 Trust: Austin Clements <austin@google.com> Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
Diffstat (limited to 'src/runtime/debug.go')
0 files changed, 0 insertions, 0 deletions