Go Lang: prepend leading zero before single digit number

To zero pad a single digit unsigned integer in go use the fmt package. Sprintf allows you to save the output of the formatting to a variable.

Leave a Reply

Your email address will not be published. Required fields are marked *