golang Iris – function to view

 // Default template funcs are:
    //
    // - {{ urlpath "myNamedRoute" "pathParameter_ifNeeded" }}
    // - {{ render "header.html" }}
    // and partial relative path to current page:
    // - {{ render_r "header.html" }} 
    // - {{ yield }}
    // - {{ current }}
    // Register a custom template func:
    tmpl.AddFunc("greet", func(s string) string {
        return "Greetings " + s + "!"
    })
https://github.com/kataras/iris/wiki/View

Share and Enjoy !

0Shares
0 0 0

A Go port of Ruby’s dotenv library (Loads environment variables from `.env`.)

Share and Enjoy !

0Shares
0 0 0