mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 01:06:27 +00:00
small cleanup on pkg/config
This commit is contained in:
parent
f24ea5ce59
commit
d4c37e352e
@ -78,7 +78,8 @@ func CreateObject(client *client.RESTClient, mapping *meta.RESTMapping, obj runt
|
|||||||
// TODO: This should be using RESTHelper
|
// TODO: This should be using RESTHelper
|
||||||
err = client.Post().Path(mapping.Resource).Namespace(namespace).Body(obj).Do().Error()
|
err = client.Post().Path(mapping.Resource).Namespace(namespace).Body(obj).Do().Error()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return &errs.ValidationError{errs.ValidationErrorTypeInvalid, name, err}
|
e := errs.NewFieldInvalid(name, err)
|
||||||
|
return &e
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user