Merge pull request #53363 from tcharding/genutils

Automatic merge from submit-queue (batch tested with PRs 52367, 53363, 54989, 54872, 54643). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

cmd: genutils: remove entry from .golint_failures

**What this PR does / why we need it**:

`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`

**Special notes for your reviewer**:
   
Don't know which sig to use?

**Release note**:

```release-note
NONE
```

/kind cleanup
This commit is contained in:
Kubernetes Submit Queue 2017-11-02 12:59:16 -07:00 committed by GitHub
commit 113ab743b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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