cp foo.go foo.go.orig
env GOFUMPT_VERSION_TEST=v0.1.1-0.20210524140936-ba6406b58f36

gofumpt -w foo.go
cmp foo.go foo.go.golden

gofumpt -w outdated.go
cmp outdated.go foo.go.golden

cp foo.go.orig foo.go
gofumpt -w -extra foo.go
cmp foo.go foo.go.golden-extra

cp foo.go.orig foo.go
gofumpt -w -lang=v1 foo.go
cmp foo.go foo.go.golden-lang

gofumpt -d nochange.go
! stdout .

gofumpt -d foo.go.golden
! stdout .

gofumpt -d -extra foo.go.golden-extra
! stdout .

-- go.mod --
module test

go 1.16
-- foo.go --
package p

//gofumpt:diagnose
-- outdated.go --
package p

//gofumpt:diagnose v0.1.0
-- nochange.go --
package p

//gofumpt:diagnosefoobar
-- foo.go.golden --
package p

//gofumpt:diagnose v0.1.1-0.20210524140936-ba6406b58f36 -lang=v1.16
-- foo.go.golden-extra --
package p

//gofumpt:diagnose v0.1.1-0.20210524140936-ba6406b58f36 -lang=v1.16 -extra
-- foo.go.golden-lang --
package p

//gofumpt:diagnose v0.1.1-0.20210524140936-ba6406b58f36 -lang=v1
