Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeFormat ¶
MakeFormat is a helper to aid with the implementation of fmt.Formatter for custom types. It reproduces the format currently active in fmt.State and verb. This is provided because Go's standard fmt.State does not make the original format string available to us.
If the return value justV is true, then the current state was found to be %v exactly; in that case the caller can avoid a full-blown Printf call and use just Print instead to take a shortcut.
func ReproducePrintf ¶
ReproducePrintf formats the value of arg using the current formatting parameters in the provided fmt.State and verb, into the provided io.Writer.
When implementing a Format() method, one can use
ReproducePrintf(s, s, verb, ...)
Where the fmt.State is used both as the source of formatting parameters and the output destination.
Types ¶
This section is empty.