Golang Convert String na int
Int, err := strconv.Atoi("12345")
Splendid-est Swan
Int, err := strconv.Atoi("12345")
s := "97"
if n, err := strconv.Atoi(s); err == nil {
fmt.Println(n+1)
} else {
fmt.Println(s, "is not an integer.")
}
// Output: 98