Atoi is equivalent to ParseInt(s, 10, 0), converted to type int.
package main import ( "fmt" "strconv" ) func main() { v := "10" if s, err := strconv.Atoi(v); err == nil { fmt.Printf("%T, %v", s, s) } }