code: func (r *Request) Resource(resource string) *Request {
  	if r.err != nil {
  		return r
  	}
  	if len(r.resource) != 0 {
  		r.err = fmt.Errorf("resource already set to %q, cannot change to %q", r.resource, resource)
  		return r
  	}
  	if msgs := IsValidPathSegmentName(resource); len(msgs) != 0 {
  		r.err = fmt.Errorf("invalid resource %q: %v", resource, msgs)
  		return r
  	}
  	r.resource = resource
  	return r
  }
docs: // Resource sets the resource to access (<resource>/[ns/<namespace>/]<name>)