V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
The Go Programming Language
http://golang.org/
Go Playground
Go Projects
Revel Web Framework
dkcook

golang 中有 text/template 标准包 , template 中的 Must 方法是怎么使用?

  •  
  •   dkcook · Feb 22, 2017 · 955 views
    This topic created in 3365 days ago, the information mentioned may be changed or developed.

    第一种写法: t.templ = template.Must(template.ParseFiles(filepath.Join("templates", t.filename))) } 第二种写法: var t = template.Must(template.New("name").Parse("text"))

    山面两种有什么区别吗?

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1727 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 16:22 · PVG 00:22 · LAX 09:22 · JFK 12:22
    ♥ Do have faith in what you're doing.