OneCompiler

How to convert number to string in Go

How can I convert a number (int/ int64) to a string type in golang?

1 Answer

4 years ago by

Following util can be used to convert number type to string type in golang

func NumberToString(inp int64) string {
    return strconv.Itoa(int(inp))
}
4 years ago by Karthik Divi