Round float and format to string #round-float-and-format-to-string If you’re rounding a floating point number in Go, it’s most likely you want to format it in a string.
heightInMeters := 76234 msg := fmt.Sprintf("Your height is: %.3f", heightInMeters) // msg = "Your height is: 1.762"