code: func ParseEnumName(elems []string, name string) (Enum, error) {
  	for i, n := range elems {
  		if strings.EqualFold(n, name) {
  			return Enum{Name: n, Value: uint64(i) + 1}, nil
  		}
  	}
  
  	// name doesn't exist, maybe an integer?
  	if num, err := strconv.ParseUint(name, 0, 64); err == nil {
  		return ParseEnumValue(elems, num)
  	}
  
  	return Enum{}, errors.Errorf("item %s is not in enum %v", name, elems)
  }
docs: // ParseEnumName creates a Enum with item name.