I'm trying to get a float to print using fmt.Printf with a minimum width of 3
fmt.Printf("%3f", float64(0))
Should print 0.00
, but it instead prints 0.000000
If I set the precision to 3, it truncates the value.
Basically, what I want is if the value is 0, it should print 0.00
. If the value is 0.045
, it should print 0.045
, etc.