使用星号(*)在Go中指定宽度和精度

The official fmt pacakge documentation at golang.org says this in respect to specifying width and precision -

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.

How will the asterisk (*) be used, say, for example, in the following scenario -

 var f float32 = 12.3456789
 fmt.Printf("%6.3f", f)

It would be

var f float32 = 12.3456789
fmt.Printf("%*.*f", 20, 1, f)

See more at:

fmt.Sprintf("%[3]*.[2]*[1]f", 12.0, 2, 6)

equivalent to

fmt.Sprintf("%6.2f", 12.0)