Arquivo da categoria: Programação

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

Share and Enjoy !

0Shares
0 0 0

golang iris return directly template html

package controllers

import (
    "github.com/kataras/iris/mvc"
)
type HelloController struct{}

var helloView = mvc.View{
    Name: "hello/index.html",
    Data: map[string]interface{}{
        "Title":     "Hello Page",
        //"MyMessage": "Welcome to my awesome website",
    },
}
func (c *HelloController) Get() mvc.Result {
    return helloView
}
https://stackoverflow.com/questions/51099508/golang-iris-return-directly-template-html

Share and Enjoy !

0Shares
0 0 0