示例#1
0
文件: weather.go 项目: sqp/godock
// FormatTemplate formats the given data object with the given template function name.
//
func FormatTemplate(template *cdtype.Template, funcName string, data interface{}) (string, error) {
	text, e := template.ToString(funcName, data)
	return strings.Trim(text, " \n"), e
}