.gitignore added
[dotfiles/.git] / .config / coc / extensions / coc-go-data / tools / pkg / mod / mvdan.cc / gofumpt@v0.1.0 / testdata / scripts / comment-spaced.txt
1 gofumpt -w foo.go
2 cmp foo.go foo.go.golden
3
4 gofumpt -d foo.go.golden
5 ! stdout .
6
7 -- foo.go --
8 // +build tag
9
10 package p
11
12 //go:generate some command
13
14 //go:unknowndirective
15
16 //lint:disablefoo
17
18 //nolint
19
20 //nolint // explanation
21
22 //nolint:somelinter // explanation
23
24 //not actually: a directive
25
26 //https://just.one/url
27
28 //TODO: do something
29
30 //export CgoFunc
31
32 //extern open
33 func c_open(name *byte, mode int, perm int) int
34
35 //line 123
36
37 //sys   Unlink(path string) (err error)
38
39 //sysnb Getpid() (pid int)
40
41 //foo is foo.
42 type foo int
43
44 //      comment with a tab.
45
46 //  comment with many spaces
47
48 //comment group
49 //123 numbers too
50
51 // comment group
52 //123 numbers too
53
54 //{
55 //this is probably code
56 //}
57
58 ////////////
59 // ascii art
60 //----------
61
62 //
63 -- foo.go.golden --
64 // +build tag
65
66 package p
67
68 //go:generate some command
69
70 //go:unknowndirective
71
72 //lint:disablefoo
73
74 //nolint
75
76 //nolint // explanation
77
78 //nolint:somelinter // explanation
79
80 // not actually: a directive
81
82 // https://just.one/url
83
84 // TODO: do something
85
86 //export CgoFunc
87
88 //extern open
89 func c_open(name *byte, mode int, perm int) int
90
91 //line 123
92
93 //sys   Unlink(path string) (err error)
94
95 //sysnb Getpid() (pid int)
96
97 // foo is foo.
98 type foo int
99
100 //      comment with a tab.
101
102 //  comment with many spaces
103
104 // comment group
105 // 123 numbers too
106
107 // comment group
108 // 123 numbers too
109
110 //{
111 //this is probably code
112 //}
113
114 ////////////
115 // ascii art
116 //----------
117
118 //