• Joe Tsai's avatar
    cmd/doc: truncate long lists of arguments · a1ea9121
    Joe Tsai authored
    Some field-lists (especially in generated code) can be excessively long.
    In the one-line printout, it does not make sense to print all elements
    of the list if line-wrapping causes the "one-line" to become multi-line.
    
    // Before:
    var LongLine = newLongLine("someArgument1", "someArgument2", "someArgument3", "someArgument4", "someArgument5", "someArgument6", "someArgument7", "someArgument8")
    
    // After:
    var LongLine = newLongLine("someArgument1", "someArgument2", "someArgument3", "someArgument4", ...)
    
    Change-Id: I4bbbe2dbd1d7be9f02d63431d213088c3dee332c
    Reviewed-on: https://go-review.googlesource.com/36031
    Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarRob Pike <r@golang.org>
    a1ea9121
pkg.go 24 KB