http://play.golang.org/p/3mjFDTTOXG
printf int is ok, but with float, I got no leading zero.
fmt.Printf("%03.6f
", 1.234)
>1.234000
Why this happen ?How to make the leading zero display ?
golang v1.4.1
EDIT
I figured it out
fmt.Printf("%010.6f
", 1.234)
this is ok now.
EDIT
from https://golang.org/pkg/fmt/
Width and precision are measured in units of Unicode code points, that is, runes. (This differs from C's printf where the units are always measured in bytes.) Either or both of the flags may be replaced with the character '*', causing their values to be obtained from the next operand, which must be of type int.