func (t templateType) ParseFiles(file string) *template.Template {
	buf, err := ioutil.ReadFile(file)
	if err != nil {
		panic(err)
	}
	s := string(buf)
	name := filepath.Base(file)
	return template.Must(template.New(name).Funcs(t.FuncMap).Parse(s))
}
/*
Description:
ParseFiles parse a file, and apply funcMap return a new template
 * Author: architect.bian
 * Date: 2018/10/23 14:08
 */
ParseFiles parse a file, and apply funcMap return a new template
Author: architect.bian
Date: 2018/10/23 14:08
/ * Description : ParseFiles parse a file and apply funcMap return a new template * Author : architect . bian * Date : 2018 / 10 / 23 14 : 08 * /
func (t templateType) ParseFiles(file string) *template.Template {
	buf, err := ioutil.ReadFile(file)
	if err != nil {
		panic(err)
	}
	s := string(buf)
	name := filepath.Base(file)
	return template.Must(template.New(name).Funcs(t.FuncMap).Parse(s))
}
func ( t templateType ) ParseFiles ( file string ) * template . Template { buf , err := ioutil . ReadFile ( file ) if err != nil { panic ( err ) } s := string ( buf ) name := filepath . Base ( file ) return template . Must ( template . New ( name ) . Funcs ( t . FuncMap ) . Parse ( s ) ) }
ParseFiles parse a file, and apply funcMap return a new template
Author: architect.bian
Date: 2018/10/23 14:08
ParseFiles parse a file and apply funcMap return a new template Author : architect . bian Date : 2018 / 10 / 23 14 : 08