From 60d7d247a1a5d96152061aa9cfeb5466b90a6787 Mon Sep 17 00:00:00 2001 From: Jaana Burcu Dogan Date: Fri, 10 Feb 2017 14:34:37 -0800 Subject: [PATCH] cmd/nm: extend help text to document the flags Change-Id: Ia2852666ef44e7ef0bba2360e92caccc83fd0e5c Reviewed-on: https://go-review.googlesource.com/36796 Reviewed-by: Ian Lance Taylor Run-TryBot: Ian Lance Taylor TryBot-Result: Gobot Gobot --- src/cmd/nm/nm.go | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/cmd/nm/nm.go b/src/cmd/nm/nm.go index 4384af8fae..2e2dd75018 100644 --- a/src/cmd/nm/nm.go +++ b/src/cmd/nm/nm.go @@ -15,8 +15,21 @@ import ( "cmd/internal/objfile" ) +const helpText = `usage: go tool nm [options] file... + -n + an alias for -sort address (numeric), + for compatibility with other nm commands + -size + print symbol size in decimal between address and type + -sort {address,name,none,size} + sort output in the given order (default name) + size orders from largest to smallest + -type + print symbol type after name +` + func usage() { - fmt.Fprintf(os.Stderr, "usage: go tool nm [-n] [-size] [-sort order] [-type] file...\n") + fmt.Fprintf(os.Stderr, helpText) os.Exit(2) } -- 2.50.0