注入带有变量的字符串模板

I was looking at this article:

https://medium.com/@IndianGuru/understanding-go-s-template-package-c5307758fab0

I am wondering how to inject a variable into a string using templating, for example:

func getTemplate(v string) string {
    return `CREATE TABLE share_${v} PARTITION OF share FOR VALUES IN (${v});`
}

the example in the article writes the output to stdout, but I need to store the result of the template as a variable, anyone know how?

Something like:

result := getTemplate("0")

Golang templating is motherf*cking bonkers. This should work:

func getTableCreationCommands(v string) string {
    return `
      CREATE TABLE share_` + v + ` PARTITION OF share FOR VALUES IN (` + v + `);
      CREATE TABLE nearby_` + v + ` PARTITION OF nearby FOR VALUES IN (` + v + `);
    `
}