27 lines
428 B
Plaintext
27 lines
428 B
Plaintext
cp foo.orig.go foo.go
|
|
! exec gofumpt -w -r foo foo.go
|
|
stderr 'the rewrite flag is no longer available; use "gofmt -r" instead\n'
|
|
cmp foo.orig.go foo.go
|
|
|
|
exec gofumpt -w -s foo.go
|
|
stderr 'warning: -s is deprecated as it is always enabled\n'
|
|
cmp foo.go foo.go.golden
|
|
|
|
exec gofumpt -d foo.go.golden
|
|
! stdout .
|
|
|
|
-- foo.orig.go --
|
|
package p
|
|
|
|
func f() {
|
|
|
|
println("foo")
|
|
|
|
}
|
|
-- foo.go.golden --
|
|
package p
|
|
|
|
func f() {
|
|
println("foo")
|
|
}
|