cmd: genutils: remove golint_failure entry

`golint` emits warnings

```
exported function OutDir should have comment or be unexported.
strings should not be capitalized or end with punctuation or a newline
```

- Add documentation comment to exported function OutDir.
- Remove newline from error string.
- Remove `hack\.golint_failures` entry for `cmd/genutils`
pull/6/head
tcharding 2017-10-03 16:10:46 +11:00
parent 4aaf39a5c0
commit 8739ee7bd1
2 changed files with 3 additions and 2 deletions

View File

@ -22,6 +22,8 @@ import (
"path/filepath"
)
// OutDir creates the absolute path name from path and checks path exists.
// Returns absolute path including trailing '/' or error if path does not exist.
func OutDir(path string) (string, error) {
outDir, err := filepath.Abs(path)
if err != nil {
@ -34,7 +36,7 @@ func OutDir(path string) (string, error) {
}
if !stat.IsDir() {
return "", fmt.Errorf("output directory %s is not a directory\n", outDir)
return "", fmt.Errorf("output directory %s is not a directory", outDir)
}
outDir = outDir + "/"
return outDir, nil

View File

@ -1,5 +1,4 @@
cluster/images/etcd-version-monitor
cmd/genutils
cmd/gke-certificates-controller/app
cmd/hyperkube
cmd/kube-controller-manager/app