code: func (r *Result) ResourceMapping() (*meta.RESTMapping, error) {
  	if r.err != nil {
  		return nil, r.err
  	}
  	mappings := map[schema.GroupVersionResource]*meta.RESTMapping{}
  	for i := range r.sources {
  		m, ok := r.sources[i].(ResourceMapping)
  		if !ok {
  			return nil, fmt.Errorf("a resource mapping could not be loaded from %v", reflect.TypeOf(r.sources[i]))
  		}
  		mapping := m.ResourceMapping()
  		mappings[mapping.Resource] = mapping
  	}
  	if len(mappings) != 1 {
  		return nil, fmt.Errorf("expected only a single resource type")
  	}
  	for _, mapping := range mappings {
  		return mapping, nil
  	}
  	return nil, nil
  }
docs: // ResourceMapping returns a single meta.RESTMapping representing the
  // resources located by the builder, or an error if more than one
  // mapping was found.