Golang Sprintf is an inbuilt function that formats according to a format specifier and returns the resulting string. Golang offers excellent support for string formatting in the Sprintf function. Package fmt implements formatted I/O with functions analogous to C’s printf and scanf. The format ‘verbs’ are derived from C’s but are more straightforward.
Go Sprintf() function is useful to format a string without printing the string.
func Sprintf(format string, a ...interface{}) string
#golang #go