How to Convert an int Value to String in Go?

t := strconv.Itoa(123)
fmt.Printf("type = %T, val = %s", t, t)

We can use strconv package’s Itoa function.

Subscribe for
weekly updates

newsletter