Files
LearnGO/go/pkg/mod/mvdan.cc/gofumpt@v0.7.0/testdata/script/comment-spaced.txtar
T
2024-09-19 21:38:24 -04:00

141 lines
1.6 KiB
Plaintext

exec gofumpt -w foo.go
cmp foo.go foo.go.golden
exec gofumpt -d foo.go.golden
! stdout .
-- foo.go --
//go:build tag
// +build tag
package p
//go:generate some command
//go:unknowndirective
//lint:disablefoo
//go-sumtype:decl Foo
//nolint
//nolint // explanation
//nolint:somelinter // explanation
//NOSONAR
//NOSONAR // explanation
//noinspection ALL
//noinspection foo,bar
//not actually: a directive
//https://just.one/url
//TODO: do something
//export CgoFunc
//extern open
func c_open(name *byte, mode int, perm int) int
//line 123
//sys Unlink(path string) (err error)
//sysnb Getpid() (pid int)
//foo is foo.
type foo int
// comment with a tab.
// comment with many spaces
//comment group
//123 numbers too
// comment group
//123 numbers too
//{
//this is probably code
//}
////////////
// ascii art
//----------
//
-- foo.go.golden --
//go:build tag
// +build tag
package p
//go:generate some command
//go:unknowndirective
//lint:disablefoo
//go-sumtype:decl Foo
//nolint
//nolint // explanation
//nolint:somelinter // explanation
//NOSONAR
//NOSONAR // explanation
//noinspection ALL
//noinspection foo,bar
// not actually: a directive
// https://just.one/url
// TODO: do something
//export CgoFunc
//extern open
func c_open(name *byte, mode int, perm int) int
//line 123
//sys Unlink(path string) (err error)
//sysnb Getpid() (pid int)
// foo is foo.
type foo int
// comment with a tab.
// comment with many spaces
// comment group
// 123 numbers too
// comment group
// 123 numbers too
//{
//this is probably code
//}
////////////
// ascii art
//----------
//