Skip to content

dmae3/gin-pongo2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gin-pongo2

GoDoc Build Status

pongo2 middleware for Gin

##Example:

package main

import (
    "http"

    "github.com/gin-gonic/gin"
    "github.com/daine46/gin-pongo2"
)

func main() {
    r := gin.Default()

    // first parameter is template's base directory
    r.HTMLRender = ginpon.New("app/views", gin.IsDebugging())

    r.GET("/", func(c *gin.Context) {
	    c.HTML(http.StatusOK, "index.tpl", ginpon.Context{"key": "value"})
    })

    r.Run(":3000")
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages