code: func ToInt(str string) (int64, error) {
  	res, err := strconv.ParseInt(str, 0, 64)
  	if err != nil {
  		res = 0
  	}
  	return res, err
  }
docs: // ToInt convert the input string to an integer, or 0 if the input is not an integer.