• Tim Cooper's avatar
    flag: align multi-line usage strings · 0828ec1e
    Tim Cooper authored
    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: 's avatarRuss Cox <rsc@golang.org>
    0828ec1e
Name
Last commit
Last update
..
example_test.go Loading commit data...
export_test.go Loading commit data...
flag.go Loading commit data...
flag_test.go Loading commit data...