golong beego 报错

wwwql 2016-11-09 04:55:26
beego,报错,是什么原因,谢谢
C:/go/bin/go.exe build -i [C:/go/src/hello/controllers]
can't load package: c:\go\src\hello\controllers\default.go:4:2: non-standard import "github.com/astaxie/beego" in standard package "hello/controllers"
错误: 进程退出代码 1.


源码:
package controllers

import (
"github.com/astaxie/beego"
)

type MainController struct {
beego.Controller
}

func (c *MainController) Get() {
c.Data["Website"] = "beego.me"
c.Data["Email"] = "astaxie@gmail.com"
c.TplName = "index.tpl"
}

...全文
2215 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
码无边 2017-11-25
  • 打赏
  • 举报
回复
hello.go package controllers import ( "github.com/astaxie/beego" ) type HelloController struct { beego.Controller } func (c *HelloController) Get() { c.Data["Website"] = "beego.me" c.Data["Email"] = "astaxie@gmail.com" c.TplName = "index.tpl" }

2,190

社区成员

发帖
与我相关
我的任务
社区描述
go语言学习与交流版
社区管理员
  • go语言社区
  • Freeman Z
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧