Skip to content

Instantly share code, notes, and snippets.

@congjf
Last active December 28, 2015 17:49
Show Gist options
  • Save congjf/7538576 to your computer and use it in GitHub Desktop.
Save congjf/7538576 to your computer and use it in GitHub Desktop.
ExecuteTemplate
func hello(ctx *web.Context) {
err := templates.ExecuteTemplate(ctx.ResponseWriter, "index.html", "no needed data")
if err != nil {
panic(err.Error())
}
}
func main() {
web.Get("/", hello)
web.Run("0.0.0.0:9990")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment