go/src/flag
Tim Cooper 0828ec1ea8 flag: align multi-line usage strings
Previously, a multi-line flag usage string would not be indented with the
rest of the usage strings. This made long usage strings difficult to read.

For example, the usage for flag.String("A", "", "1\n2\n3") would be printed
as:

  -A	1
2
3

But will now be printed as:

  -A	1
    	2
    	3

Also fixes a slight error in the FlagSet.PrintDefaults documentation.

Fixes #20799

Change-Id: I4379c6b7590fdb93a2809a01046a0f6ae32c3e5d
Reviewed-on: https://go-review.googlesource.com/66711
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2017-09-28 20:45:32 +00:00
..
example_test.go
export_test.go flag: make default Usage prefer CommandLine's output over just os.Stderr 2017-08-08 01:47:47 +00:00
flag.go flag: align multi-line usage strings 2017-09-28 20:45:32 +00:00
flag_test.go flag: align multi-line usage strings 2017-09-28 20:45:32 +00:00