Skip to content

Glossary: Data Structures and Algorithms in Go

%02d

Also written: Sprintf, Printf verbs

A format verb that prints a whole number at least 2 characters wide, padded with a leading zero, so 9 prints as `09`. `Sprintf` builds the text instead of printing it.

Where the book teaches it