code: func parseName(field reflect.StructField, tagName string, mapFunc, tagMapFunc mapf) (tag, fieldName string) {
  	// first, set the fieldName to the field's name
  	fieldName = field.Name
  	// if a mapFunc is set, use that to override the fieldName
  	if mapFunc != nil {
  		fieldName = mapFunc(fieldName)
  	}
  
  	// if there's no tag to look for, return the field name
  	if tagName == "" {
  		return "", fieldName
  	}
  
  	// if this tag is not set using the normal convention in the tag,
  	// then return the fieldname..  this check is done because according
  	// to the reflect documentation:
  	//    If the tag does not have the conventional format,
  	//    the value returned by Get is unspecified.
  	// which doesn't sound great.
  	if !strings.Contains(string(field.Tag), tagName+":") {
  		return "", fieldName
  	}
  
  	// at this point we're fairly sure that we have a tag, so lets pull it out
  	tag = field.Tag.Get(tagName)
  
  	// if we have a mapper function, call it on the whole tag
  	// XXX: this is a change from the old version, which pulled out the name
  	// before the tagMapFunc could be run, but I think this is the right way
  	if tagMapFunc != nil {
  		tag = tagMapFunc(tag)
  	}
  
  	// finally, split the options from the name
  	parts := strings.Split(tag, ",")
  	fieldName = parts[0]
  
  	return tag, fieldName
  }
docs: // parseName parses the tag and the target name for the given field using
  // the tagName (eg 'json' for `json:"foo"` tags), mapFunc for mapping the
  // field's name to a target name, and tagMapFunc for mapping the tag to
  // a target name.