How to fmt.Printf an integer with thousands comma

formatting, go, printf, string

Solution

None of the fmt print verbs support thousands separators.

Problem

Does Go's `fmt.Printf` support outputting a number with the thousands comma? `fmt.Printf("%d", 1000)` outputs `1000`, what format can I specify to output `1,000` instead? The docs don't seem to mention commas, and I couldn't immediately see anything in the source.

Original source