mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-10 13:42:02 +00:00
Use a strong type for UID fields
This commit is contained in:
@@ -63,7 +63,7 @@ func (rs *REST) Create(ctx api.Context, obj runtime.Object) (<-chan apiserver.RE
|
||||
}
|
||||
|
||||
if len(controller.Name) == 0 {
|
||||
controller.Name = util.NewUUID().String()
|
||||
controller.Name = string(util.NewUUID())
|
||||
}
|
||||
if errs := validation.ValidateReplicationController(controller); len(errs) > 0 {
|
||||
return nil, errors.NewInvalid("replicationController", controller.Name, errs)
|
||||
|
Reference in New Issue
Block a user