Let's say I have a string "Hello %s. How are you %s"
and I want to put the same string in both of %s
. The obvious option is to use:
fmt.Printf("Hello %s. How are you %s", "KK", "KK") // returns "Hello KK. How are you KK"
is there a way to index the parameters so that I don't have to repeat "KK"
?