其他分享
首页 > 其他分享> > beego快速体验

beego快速体验

作者:互联网

beego快速体验

func (c *MainController) Get() {
	c.Data["Website"] = "beego.me"
	c.Data["Email"] = "astaxie@gmail.com"
	//c.TplName = "index.tpl"
	c.TplName = "test.html"
}
<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>

<h1>hello world</h1>
<h1>{{.Email}}</h1>

</body>
</html>

标签:beego,Data,TplName,html,体验,test,快速,Email
来源: https://blog.csdn.net/qq_44140067/article/details/122165003