fmt.Printf()
Formatted output (does not add a newline).
Syntax
fmt.Printf("format", values...)Description
Prints with placeholders: %d for number, %s for text, %v for any value, %T for type. Add \n for a newline.
Example
Loading editor…
Expected output
Alex is 36 years old
When to use?
Tables, formatted reports.