Skip to content

Commit d766d2c

Browse files
committed
add tests
1 parent 9516947 commit d766d2c

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
//args: -Egovet
2+
//config: linters-settings.govet.enable=fieldalignment
3+
package p
4+
5+
import "log"
6+
7+
type gvfaGood struct {
8+
y int32
9+
x byte
10+
z byte
11+
}
12+
13+
type gvfaBad struct {
14+
x byte
15+
y int32
16+
z byte
17+
}
18+
19+
func test() {
20+
g := gvfaGood{1, 2, 3}
21+
b := gvfaBad{1, 2, 3}
22+
log.Printf("good: %v; bad: %v", g, b)
23+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
//args: -Egovet
2+
//config: linters-settings.govet.enable=fieldalignment
3+
package p
4+
5+
import "log"
6+
7+
type gvfaGood struct {
8+
y int32
9+
x byte
10+
z byte
11+
}
12+
13+
type gvfaBad struct {
14+
y int32
15+
x byte
16+
z byte
17+
}
18+
19+
func test() {
20+
g := gvfaGood{1, 2, 3}
21+
b := gvfaBad{1, 2, 3}
22+
log.Printf("good: %v; bad: %v", g, b)
23+
}

0 commit comments

Comments
 (0)