strings.Repeat
Takes a string S and an int N as parameters, returns a new string with S repeated N times.
package main import ( "fmt" "strings" ) func main() { fmt.Println(strings.Repeat("foobar", 2)) // prints foobarfoobar }
Source