A NumError records a failed conversion.
package main import ( "fmt" "strconv" ) func main() { str := "Not a number" if _, err := strconv.ParseFloat(str, 64); err != nil { e := err.(*strconv.NumError) fmt.Println("Func:", e.Func) fmt.Println("Num:", e.Num) fmt.Println("Err:", e.Err) fmt.Println(err) } }