go的html模板替換

  一、模版注入函數      t.Funcs()html   二、字符串做爲模版      Template.Must函數   三、模版的Map或者Struct替換       t := template.New(「index.html」)  -----建立模板       t.ParseFiles(「index.html」)   ----找到其中須要替換的模板變量       t.Execut
相關文章
相關標籤/搜索