diff --git a/README.md b/README.md index 5b83645..7385566 100644 --- a/README.md +++ b/README.md @@ -385,7 +385,7 @@ var _ = map[string]string{ -Interfaces should not have leading or trailing empty lines +Field lists should not have leading or trailing empty lines
example @@ -396,6 +396,12 @@ type Person interface { Age() int +} + +type ZeroFields struct { + + // No fields are needed here. + } ``` @@ -405,6 +411,10 @@ type Person interface { Age() int } + +type ZeroFields struct { + // No fields are needed here. +} ```
diff --git a/testdata/scripts/block-empty.txt b/testdata/scripts/block-empty.txt index bd205fa..435abf3 100644 --- a/testdata/scripts/block-empty.txt +++ b/testdata/scripts/block-empty.txt @@ -25,16 +25,16 @@ func f() { // lone comment - - + + } type I interface { // lone comment - - + + } @@ -43,19 +43,16 @@ func f() { type SOut struct { // lone comment - + } type IOut interface { - + // lone comment } - - - -- foo.go.golden -- package p