mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Merge pull request #51447 from sakeven/rm_useless_code
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 <jc5930@sina.cn> **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 ```
This commit is contained in:
commit
c4d3c57f8b
@ -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)) {
|
||||
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user