Example #1
0
// namespace applies a namespace to the request if the configured
// resource is a namespaced resource. Otherwise, it just returns the
// passed in request.
func (rc *ResourceClient) namespace(req *restclient.Request) *restclient.Request {
	if rc.resource.Namespaced {
		return req.Namespace(rc.ns)
	}
	return req
}