return a float as a string in golang code example Example: Go convert float to a string s := fmt.Sprintf("%f", 123.456) // s == "123.456000"