fmt.Sprintf()
Returns the formatted text WITHOUT printing it.
Syntax
fmt.Sprintf("format", ...)Description
Formats like Printf but doesn't print to the screen; returns the result as a string (assigned to a variable).
Example
Loading editor…
Expected output
Score: 95
When to use?
Creating and storing/concatenating text.