go的html模板替换

  一、模版注入函数      t.Funcs()html   二、字符串做为模版      Template.Must函数   三、模版的Map或者Struct替换       t := template.New(“index.html”)  -----建立模板       t.ParseFiles(“index.html”)   ----找到其中须要替换的模板变量       t.Execut
相关文章
相关标签/搜索