projects
/
dotfiles
/
.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Giant blob of minor changes
[dotfiles/.git]
/
.config
/
coc
/
extensions
/
coc-go-data
/
tools
/
pkg
/
mod
/
mvdan.cc
/
gofumpt@v0.0.0-20200802201014-ab5a8192947d
/
testdata
/
scripts
/
decl-group-single.txt
1
[!gofumpt] skip 'would remove the unused imports'
2
3
gofumpt -w f1.go f2.go
4
cmp f1.go f1.go.golden
5
cmp f2.go f2.go.golden
6
7
gofumpt -d f1.go.golden f2.go.golden
8
! stdout .
9
10
-- f1.go --
11
package p
12
13
import "non-grouped"
14
15
import (
16
"grouped"
17
)
18
19
var single = "foo"
20
21
var (
22
// verbose is verbose.
23
verbose = "bar"
24
)
25
26
// This entire block has a comment.
27
var (
28
groupComment = "bar"
29
)
30
31
var (
32
multiple1 string
33
multiple2 string
34
)
35
36
const (
37
first = iota
38
)
39
40
var (
41
multiline = []string{
42
"foo",
43
"bar",
44
}
45
)
46
-- f1.go.golden --
47
package p
48
49
import "non-grouped"
50
51
import (
52
"grouped"
53
)
54
55
var single = "foo"
56
57
// verbose is verbose.
58
var verbose = "bar"
59
60
// This entire block has a comment.
61
var (
62
groupComment = "bar"
63
)
64
65
var (
66
multiple1 string
67
multiple2 string
68
)
69
70
const (
71
first = iota
72
)
73
74
var multiline = []string{
75
"foo",
76
"bar",
77
}
78
-- f2.go --
79
package p
80
81
func _() {
82
var (
83
_ int
84
)
85
}
86
-- f2.go.golden --
87
package p
88
89
func _() {
90
var _ int
91
}