setRequestObjectInfo adds necessary type information to requests.
(req *rest.Request, namespace string, mapping *meta.RESTMapping)
| 358 | |
| 359 | // setRequestObjectInfo adds necessary type information to requests. |
| 360 | func setRequestObjectInfo(req *rest.Request, namespace string, mapping *meta.RESTMapping) { |
| 361 | // if namespace scoped resource, set namespace |
| 362 | req.NamespaceIfScoped(namespace, isNamespaceScoped(mapping)) |
| 363 | |
| 364 | // set resource name |
| 365 | req.Resource(mapping.Resource) |
| 366 | } |
| 367 | |
| 368 | // alreadyExists checks if the error is for a resource already existing. |
| 369 | func alreadyExists(err error) bool { |
no test coverage detected