Merge pull request #85 from tamird/go-nyet

Incorporate go-nyet
pull/4/head
Jim Teeuwen 2015-05-11 20:45:43 +02:00
commit d0a5f1749d
7 changed files with 21 additions and 13 deletions

View File

@ -5,12 +5,20 @@ regen:
make -C testdata regen
.PHONY: check
check: errcheck
check: errcheck go-nyet
errcheck testdata/out/compress-memcopy.go
errcheck testdata/out/compress-nomemcopy.go
errcheck testdata/out/debug.go
errcheck testdata/out/nocompress-memcopy.go
errcheck testdata/out/nocompress-nomemcopy.go
go-nyet testdata/out/compress-memcopy.go
go-nyet testdata/out/compress-nomemcopy.go
go-nyet testdata/out/debug.go
go-nyet testdata/out/nocompress-memcopy.go
go-nyet testdata/out/nocompress-nomemcopy.go
errcheck:
go get github.com/kisielk/errcheck
go-nyet:
go get github.com/barakmich/go-nyet

View File

@ -231,8 +231,8 @@ func AssetDir(name string) ([]string, error) {
return nil, fmt.Errorf("Asset %s not found", name)
}
rv := make([]string, 0, len(node.Children))
for name := range node.Children {
rv = append(rv, name)
for childName := range node.Children {
rv = append(rv, childName)
}
return rv, nil
}

View File

@ -241,8 +241,8 @@ func AssetDir(name string) ([]string, error) {
return nil, fmt.Errorf("Asset %s not found", name)
}
rv := make([]string, 0, len(node.Children))
for name := range node.Children {
rv = append(rv, name)
for childName := range node.Children {
rv = append(rv, childName)
}
return rv, nil
}

View File

@ -182,8 +182,8 @@ func AssetDir(name string) ([]string, error) {
return nil, fmt.Errorf("Asset %s not found", name)
}
rv := make([]string, 0, len(node.Children))
for name := range node.Children {
rv = append(rv, name)
for childName := range node.Children {
rv = append(rv, childName)
}
return rv, nil
}

View File

@ -199,8 +199,8 @@ func AssetDir(name string) ([]string, error) {
return nil, fmt.Errorf("Asset %s not found", name)
}
rv := make([]string, 0, len(node.Children))
for name := range node.Children {
rv = append(rv, name)
for childName := range node.Children {
rv = append(rv, childName)
}
return rv, nil
}

View File

@ -221,8 +221,8 @@ func AssetDir(name string) ([]string, error) {
return nil, fmt.Errorf("Asset %s not found", name)
}
rv := make([]string, 0, len(node.Children))
for name := range node.Children {
rv = append(rv, name)
for childName := range node.Children {
rv = append(rv, childName)
}
return rv, nil
}

4
toc.go
View File

@ -117,8 +117,8 @@ func AssetDir(name string) ([]string, error) {
return nil, fmt.Errorf("Asset %%s not found", name)
}
rv := make([]string, 0, len(node.Children))
for name := range node.Children {
rv = append(rv, name)
for childName := range node.Children {
rv = append(rv, childName)
}
return rv, nil
}