mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-13 11:25:19 +00:00
Use a strong type for UID fields
This commit is contained in:
@@ -164,7 +164,7 @@ func extractFromFile(filename string) (api.BoundPod, error) {
|
||||
fmt.Fprintf(hasher, "host:%s", hostname)
|
||||
fmt.Fprintf(hasher, "file:%s", filename)
|
||||
util.DeepHashObject(hasher, pod)
|
||||
pod.UID = hex.EncodeToString(hasher.Sum(nil)[0:])
|
||||
pod.UID = util.UID(hex.EncodeToString(hasher.Sum(nil)[0:]))
|
||||
glog.V(5).Infof("Generated UID %q for pod %q from file %s", pod.UID, pod.Name, filename)
|
||||
}
|
||||
if len(pod.Namespace) == 0 {
|
||||
|
||||
Reference in New Issue
Block a user