code: func parseEnum(enum *descriptor.EnumDescriptorProto, member string) (int32, error) {
  	i := descutil.FindEnumValue(enum, member)
  	if i < 0 {
  		// Is member the number?
  		if number, err := strconv.ParseInt(member, 10, 32); err == nil {
  			i = descutil.FindValueByNumber(enum, int32(number))
  		}
  	}
  	if i < 0 {
  		return 0, fmt.Errorf("invalid value %q for enum %s", member, enum.GetName())
  	}
  	return enum.Value[i].GetNumber(), nil
  }
docs: // parseEnum returns the number of an enum member, which can be name or number.