草庐IT

meController

全部标签

go - 不能使用自己包中的结构

我在$GOPATH/src中创建了以下文件结构bitbucket.org/MyName/ProjectName我这里有以下文件ProjectName-controllers/-meController.go-app.go在app.go中,我正在这样导入我的Controller:import"bitbucket.org/MyName/ProjectName/controllers"在mainfunc中,我尝试使用它的方法。meController=new(controllers.meController)m.Get("/",meController.Index)我的meControlle

go - 不能使用自己包中的结构

我在$GOPATH/src中创建了以下文件结构bitbucket.org/MyName/ProjectName我这里有以下文件ProjectName-controllers/-meController.go-app.go在app.go中,我正在这样导入我的Controller:import"bitbucket.org/MyName/ProjectName/controllers"在mainfunc中,我尝试使用它的方法。meController=new(controllers.meController)m.Get("/",meController.Index)我的meControlle