Skip to content

Commit

Permalink
Merge pull request kubernetes#51447 from sakeven/rm_useless_code
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue. 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>.

Remove useless code

Signed-off-by: sakeven <[email protected]>



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

Function checkErrWithPrefix is never used, so we can safely remove it.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```
NONE
```
  • Loading branch information
Kubernetes Submit Queue authored Oct 5, 2017
2 parents daa0d81 + 543eaf0 commit c4d3c57
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions pkg/kubectl/cmd/util/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,6 @@ func CheckErr(err error) {
checkErr(err, fatalErrHandler)
}

// checkErrWithPrefix works like CheckErr, but adds a caller-defined prefix to non-nil errors
func checkErrWithPrefix(prefix string, err error) {
checkErr(err, fatalErrHandler)
}

// checkErr formats a given error as a string and calls the passed handleErr
// func with that string and an kubectl exit code.
func checkErr(err error, handleErr func(string, int)) {
Expand Down Expand Up @@ -578,7 +573,7 @@ func ChangeResourcePatch(info *resource.Info, changeCause string) ([]byte, types
}
}

// containsChangeCause checks if input resource info contains change-cause annotation.
// ContainsChangeCause checks if input resource info contains change-cause annotation.
func ContainsChangeCause(info *resource.Info) bool {
annotations, err := info.Mapping.MetadataAccessor.Annotations(info.Object)
if err != nil {
Expand Down

0 comments on commit c4d3c57

Please sign in to comment.