You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

strings.go 228B

1234567891011121314
  1. package common
  2. import (
  3. "strconv"
  4. )
  5. // MustAtoi converts the input string to an integer and panics on failure.
  6. func MustAtoi(input string) int {
  7. res, err := strconv.Atoi(input)
  8. if err != nil {
  9. panic(err)
  10. }
  11. return res
  12. }