1
0
mirror of https://github.com/golang/go synced 2024-10-03 03:11:21 -06:00
go/src/unicode
Joe Tsai 08f19bbde1 go/printer: forbid empty line before first comment in block
To improve readability when exported fields are removed,
forbid the printer from emitting an empty line before the first comment
in a const, var, or type block.
Also, when printing the "Has filtered or unexported fields." message,
add an empty line before it to separate the message from the struct
or interfact contents.

Before the change:
<<<
type NamedArg struct {

        // Name is the name of the parameter placeholder.
        //
        // If empty, the ordinal position in the argument list will be
        // used.
        //
        // Name must omit any symbol prefix.
        Name string

        // Value is the value of the parameter.
        // It may be assigned the same value types as the query
        // arguments.
        Value interface{}
        // contains filtered or unexported fields
}
>>>

After the change:
<<<
type NamedArg struct {
        // Name is the name of the parameter placeholder.
        //
        // If empty, the ordinal position in the argument list will be
        // used.
        //
        // Name must omit any symbol prefix.
        Name string

        // Value is the value of the parameter.
        // It may be assigned the same value types as the query
        // arguments.
        Value interface{}

        // contains filtered or unexported fields
}
>>>

Fixes #18264

Change-Id: I9fe17ca39cf92fcdfea55064bd2eaa784ce48c88
Reviewed-on: https://go-review.googlesource.com/71990
Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
2017-11-02 18:17:22 +00:00
..
utf8 unicode/utf8: make FullRune inlinable 2017-09-12 20:18:53 +00:00
utf16
casetables.go
digit_test.go
digit.go
example_test.go go/printer: forbid empty line before first comment in block 2017-11-02 18:17:22 +00:00
graphic_test.go
graphic.go
letter_test.go unicode: change SimpleFold to handle invalid runes 2016-10-12 18:30:29 +00:00
letter.go unicode: speed-up is16/is32 2017-09-12 21:32:50 +00:00
maketables.go all: revert "all: prefer strings.IndexByte over strings.Index" 2017-10-05 23:19:10 +00:00
script_test.go unicode: update to Unicode 10.0.0 2017-10-24 12:42:35 +00:00
tables.go unicode: update to Unicode 10.0.0 2017-10-24 12:42:35 +00:00