whatcanGOwrong
This commit is contained in:
@@ -0,0 +1,208 @@
|
||||
exec gofumpt -w foo.go
|
||||
cmp foo.go foo.go.golden
|
||||
|
||||
exec gofumpt -d foo.go.golden
|
||||
! stdout .
|
||||
|
||||
-- foo.go --
|
||||
package p
|
||||
|
||||
type i1 interface {
|
||||
|
||||
a(x int) int
|
||||
|
||||
|
||||
|
||||
b(x int) int
|
||||
|
||||
c(x int) int
|
||||
|
||||
D()
|
||||
|
||||
E()
|
||||
|
||||
f()
|
||||
}
|
||||
|
||||
type i2 interface {
|
||||
|
||||
// comment for a
|
||||
a(x int) int
|
||||
|
||||
// comment between a and b
|
||||
|
||||
// comment for b
|
||||
b(x int) int
|
||||
|
||||
// comment between b and c
|
||||
|
||||
c(x int) int
|
||||
|
||||
d(x int) int
|
||||
|
||||
// comment for e
|
||||
e(x int) int
|
||||
|
||||
}
|
||||
|
||||
type i3 interface {
|
||||
a(x int) int
|
||||
|
||||
// standalone comment
|
||||
|
||||
b(x int) int
|
||||
}
|
||||
|
||||
type leadingLine1 interface {
|
||||
|
||||
|
||||
a(x int) int
|
||||
}
|
||||
|
||||
type leadingLine2 interface {
|
||||
|
||||
a(x int) int
|
||||
}
|
||||
|
||||
type leadingLine3 interface {
|
||||
|
||||
// comment
|
||||
a(x int) int
|
||||
}
|
||||
|
||||
type leadingLine4 interface {
|
||||
// comment
|
||||
|
||||
a(x int) int
|
||||
}
|
||||
|
||||
type leadingLine5 interface {
|
||||
// comment
|
||||
|
||||
// comment for a
|
||||
a(x int) int
|
||||
}
|
||||
|
||||
type leadingLine6 interface {
|
||||
|
||||
// comment
|
||||
|
||||
// comment for a
|
||||
a(x int) int
|
||||
}
|
||||
|
||||
type leadingLine7 interface {
|
||||
|
||||
|
||||
// comment
|
||||
|
||||
// comment for a
|
||||
a(x int) int
|
||||
}
|
||||
|
||||
type leadingLine8 interface {
|
||||
// comment
|
||||
}
|
||||
|
||||
type ii1 interface {
|
||||
DoA()
|
||||
DoB()
|
||||
|
||||
UndoA()
|
||||
UndoB()
|
||||
}
|
||||
-- foo.go.golden --
|
||||
package p
|
||||
|
||||
type i1 interface {
|
||||
a(x int) int
|
||||
|
||||
b(x int) int
|
||||
|
||||
c(x int) int
|
||||
|
||||
D()
|
||||
|
||||
E()
|
||||
|
||||
f()
|
||||
}
|
||||
|
||||
type i2 interface {
|
||||
// comment for a
|
||||
a(x int) int
|
||||
|
||||
// comment between a and b
|
||||
|
||||
// comment for b
|
||||
b(x int) int
|
||||
|
||||
// comment between b and c
|
||||
|
||||
c(x int) int
|
||||
|
||||
d(x int) int
|
||||
|
||||
// comment for e
|
||||
e(x int) int
|
||||
}
|
||||
|
||||
type i3 interface {
|
||||
a(x int) int
|
||||
|
||||
// standalone comment
|
||||
|
||||
b(x int) int
|
||||
}
|
||||
|
||||
type leadingLine1 interface {
|
||||
a(x int) int
|
||||
}
|
||||
|
||||
type leadingLine2 interface {
|
||||
a(x int) int
|
||||
}
|
||||
|
||||
type leadingLine3 interface {
|
||||
// comment
|
||||
a(x int) int
|
||||
}
|
||||
|
||||
type leadingLine4 interface {
|
||||
// comment
|
||||
|
||||
a(x int) int
|
||||
}
|
||||
|
||||
type leadingLine5 interface {
|
||||
// comment
|
||||
|
||||
// comment for a
|
||||
a(x int) int
|
||||
}
|
||||
|
||||
type leadingLine6 interface {
|
||||
// comment
|
||||
|
||||
// comment for a
|
||||
a(x int) int
|
||||
}
|
||||
|
||||
type leadingLine7 interface {
|
||||
// comment
|
||||
|
||||
// comment for a
|
||||
a(x int) int
|
||||
}
|
||||
|
||||
type leadingLine8 interface {
|
||||
// comment
|
||||
}
|
||||
|
||||
type ii1 interface {
|
||||
DoA()
|
||||
DoB()
|
||||
|
||||
UndoA()
|
||||
UndoB()
|
||||
}
|
||||
Reference in New Issue
Block a user