name := c.GetString(key:"name") 这一行有问题吗
func (c *MainController) Get() {
name := c.GetString(key:"name")
c.Data["Website"] = name
c.Data["Email"] = "astaxie@gmail.com"
c.TplName = "index.tpl"
}
感觉没写错啊,但是终端里报错,我是win10系统
imooc/controllers
# imooc/controllers
controllers\default.go:12:25: syntax error: unexpected :, expecting comma or )
2018/10/21 19:26:13 ERROR ▶ 0014 Failed to build the application: # imooc/controllers
controllers\default.go:12:25: syntax error: unexpected :, expecting comma or )
[beego] 2018/10/21 - 19:29:02 | ::1| 200 | 6.9796ms| match| GET / r:/
[beego] 2018/10/21 - 19:29:14 | ::1| 200 | 3.0185ms| match| GET / r:/