]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/nm: extend help text to document the flags
authorJaana Burcu Dogan <jbd@google.com>
Fri, 10 Feb 2017 22:34:37 +0000 (14:34 -0800)
committerJaana Burcu Dogan <jbd@google.com>
Sat, 11 Feb 2017 08:47:58 +0000 (08:47 +0000)
Change-Id: Ia2852666ef44e7ef0bba2360e92caccc83fd0e5c
Reviewed-on: https://go-review.googlesource.com/36796
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/cmd/nm/nm.go

index 4384af8fae9e7fdf464d19a230548d99490b15fc..2e2dd75018cff5455c28cfd03c553763d4e88c09 100644 (file)
@@ -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)
 }