mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
files that are okay from the last gofmt round
R=gri http://go/go-review/1015011
This commit is contained in:
parent
58ee1f5d54
commit
d2829faa7c
16 changed files with 53 additions and 68 deletions
|
|
@ -134,9 +134,9 @@ func TestExt(t *testing.T) {
|
|||
}
|
||||
|
||||
type Node struct {
|
||||
name string;
|
||||
entries []*Node; // nil if the entry is a file
|
||||
mark int;
|
||||
name string;
|
||||
entries []*Node; // nil if the entry is a file
|
||||
mark int;
|
||||
}
|
||||
|
||||
var tree = &Node{
|
||||
|
|
@ -156,13 +156,13 @@ var tree = &Node{
|
|||
&Node{"u", nil, 0},
|
||||
&Node{"v", nil, 0},
|
||||
},
|
||||
0
|
||||
}
|
||||
0,
|
||||
},
|
||||
},
|
||||
0
|
||||
}
|
||||
0,
|
||||
},
|
||||
},
|
||||
0
|
||||
0,
|
||||
}
|
||||
|
||||
func walkTree(n *Node, path string, f func(path string, n *Node)) {
|
||||
|
|
@ -187,9 +187,7 @@ func makeTree(t *testing.T) {
|
|||
}
|
||||
|
||||
func markTree(n *Node) {
|
||||
walkTree(n, "", func(path string, n *Node) {
|
||||
n.mark++;
|
||||
});
|
||||
walkTree(n, "", func(path string, n *Node) { n.mark++ });
|
||||
}
|
||||
|
||||
func checkMarks(t *testing.T) {
|
||||
|
|
@ -210,7 +208,7 @@ func mark(name string) {
|
|||
});
|
||||
}
|
||||
|
||||
type TestVisitor struct {}
|
||||
type TestVisitor struct{}
|
||||
|
||||
func (v *TestVisitor) VisitDir(path string, d *os.Dir) bool {
|
||||
mark(d.Name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue