[go-nuts] Re: Template func ParseFiles, parsing multiple files

2017-07-06 Thread Tong Sun
Thanks Nathan. I'm still confused. >* ParseFiles adds a new template to the collection with the filename as its name* So if my MyTempl was named "tf1", calling MyTempl.ParseFiles() with more than one files will have new templates created according to each of the passed filename? Or the

[go-nuts] Re: Template func ParseFiles, parsing multiple files

2017-07-06 Thread Nathan Kerr
A text.Template contains one or more named templates. ParseFiles adds a new template to the collection with the filename as its name. Template names are used to tell Template.ExecuteTemplate which of the included templates to execute.