快速模板 Go的简单快速模板引擎。 Fasttemplate仅执行一项任务-用用户定义的值替换模板占位符。 高速:) 如果您需要快速但功能强大的html模板引擎,请查看 。 请注意,与一样,fasttemplate不会对模板值进行任何转义。 因此,在将值传递给fasttemplate之前,必须对其进行正确的转义。 在占位符替换上, 比 , , 和。 以下是基准测试结果,将fasttemplate性能与text / template,string.Replace,strings.Replacer和fmt.Fprintf进行了比较: $ go test -bench=. -bench