import "html/template" tpl := template.New("empty-template")
import "html/template" tplString := "Hello {{.Name}}, welcome to {{.City}}" tpl, err := template.New("welcome-template").Parse(tplString)In this example, a new template is created with the name "welcome-template" by parsing a string containing the template. The template contains two variables, "Name" and "City", which can be filled in when the template is executed. Package library for this function is "text/template".