// ParseRFC3339 parses an RFC3339 date in either RFC3339Nano or RFC3339 format. func ParseRFC3339(s string, nowFn func() metav1.Time) (metav1.Time, error) { … } // HashObject returns the hash of a Object hash by a Codec func HashObject(obj runtime.Object, codec runtime.Codec) (string, error) { … } // ParseFileSource parses the source given. // // Acceptable formats include: // 1. source-path: the basename will become the key name // 2. source-name=source-path: the source-name will become the key name and // source-path is the path to the key file. // // Key names cannot include '='. func ParseFileSource(source string) (keyName, filePath string, err error) { … } // ParseLiteralSource parses the source key=val pair into its component pieces. // This functionality is distinguished from strings.SplitN(source, "=", 2) since // it returns an error in the case of empty keys, values, or a missing equals sign. func ParseLiteralSource(source string) (keyName, value string, err error) { … }