diff --git a/staging/src/k8s.io/kubectl/pkg/util/util.go b/staging/src/k8s.io/kubectl/pkg/util/util.go index cf36a57b868..30127f19b94 100644 --- a/staging/src/k8s.io/kubectl/pkg/util/util.go +++ b/staging/src/k8s.io/kubectl/pkg/util/util.go @@ -17,7 +17,6 @@ limitations under the License. package util import ( - "crypto/md5" "errors" "fmt" "path" @@ -26,7 +25,6 @@ import ( "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" ) // ParseRFC3339 parses an RFC3339 date in either RFC3339Nano or RFC3339 format. @@ -41,18 +39,6 @@ func ParseRFC3339(s string, nowFn func() metav1.Time) (metav1.Time, error) { return metav1.Time{Time: t}, nil } -// HashObject returns the hash of a Object hash by a Codec -func HashObject(obj runtime.Object, codec runtime.Codec) (string, error) { - data, err := runtime.Encode(codec, obj) - if err != nil { - return "", err - } - // TODO: finish removing existing md5 usage - // https://github.com/kubernetes/kubernetes/issues/129652 - //nolint:forbidigo - return fmt.Sprintf("%x", md5.Sum(data)), nil -} - // ParseFileSource parses the source given. // // Acceptable formats include: