whatcanGOwrong

This commit is contained in:
2024-09-19 21:38:24 -04:00
commit d0ae4d841d
17908 changed files with 4096831 additions and 0 deletions
@@ -0,0 +1,118 @@
exec gofumpt -w foo.go
cmp foo.go foo.go.golden
exec gofumpt -d foo.go.golden
! stdout .
-- foo.go --
package p
func f() {
if true {
println()
}
for true {
println()
}
{
println(1, 2,
3, 4, `foo
bar`)
}
{
// comment directly before
println()
// comment after
}
{
// comment before
println()
// comment directly after
}
// For readability; the empty line helps separate the multi-line
// condition from the body.
if true &&
true {
println()
}
for true &&
true {
println()
}
if true &&
true {
// documented single statement
println()
}
}
-- foo.go.golden --
package p
func f() {
if true {
println()
}
for true {
println()
}
{
println(1, 2,
3, 4, `foo
bar`)
}
{
// comment directly before
println()
// comment after
}
{
// comment before
println()
// comment directly after
}
// For readability; the empty line helps separate the multi-line
// condition from the body.
if true &&
true {
println()
}
for true &&
true {
println()
}
if true &&
true {
// documented single statement
println()
}
}