From fff92e7decf5968e5de9d94c6688e84c05dddd7d Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Mon, 11 May 2015 09:48:50 -0400 Subject: [PATCH] Incorporate go-nyet --- Makefile | 10 +++++++++- testdata/out/compress-memcopy.go | 4 ++-- testdata/out/compress-nomemcopy.go | 4 ++-- testdata/out/debug.go | 4 ++-- testdata/out/nocompress-memcopy.go | 4 ++-- testdata/out/nocompress-nomemcopy.go | 4 ++-- toc.go | 4 ++-- 7 files changed, 21 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index 27085bf..8c06060 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/testdata/out/compress-memcopy.go b/testdata/out/compress-memcopy.go index a132fec..5964ed6 100644 --- a/testdata/out/compress-memcopy.go +++ b/testdata/out/compress-memcopy.go @@ -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 } diff --git a/testdata/out/compress-nomemcopy.go b/testdata/out/compress-nomemcopy.go index 20d1c86..19d5bdc 100644 --- a/testdata/out/compress-nomemcopy.go +++ b/testdata/out/compress-nomemcopy.go @@ -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 } diff --git a/testdata/out/debug.go b/testdata/out/debug.go index e3a2ef2..2538603 100644 --- a/testdata/out/debug.go +++ b/testdata/out/debug.go @@ -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 } diff --git a/testdata/out/nocompress-memcopy.go b/testdata/out/nocompress-memcopy.go index 645bf1f..6111be9 100644 --- a/testdata/out/nocompress-memcopy.go +++ b/testdata/out/nocompress-memcopy.go @@ -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 } diff --git a/testdata/out/nocompress-nomemcopy.go b/testdata/out/nocompress-nomemcopy.go index 52c355d..dcf199d 100644 --- a/testdata/out/nocompress-nomemcopy.go +++ b/testdata/out/nocompress-nomemcopy.go @@ -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 } diff --git a/toc.go b/toc.go index 2169099..65d519c 100644 --- a/toc.go +++ b/toc.go @@ -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 }