Skip to content

nowk/temple

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

temple

GoDoc

A simple template render struct

Install

go get gopkg.in/nowk/temple.v0

Usage

t := temple.NewTemplates("app/views")
err := t.Parse()
if err != nil {
  // handle err
}

// in your handler
h := func(w http.ResponseWriter, req *http.Request) {
  t.Render(w, "template-name", nil)
}

To force reload on each request you can send in the DevsMode configuration.

t := temple.NewTemplates("app/views", temple.DevsMode)

License

MIT

About

A simple template render struct

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages