douji1877 2015-12-14 05:17
浏览 31
已采纳

Google Appengine说我的导入不正确?

First time using google AppEngine and I am trying to launch this is my current files

├── app.yaml
├── controllers
│   ├── admin
│   │   └── admin.go
│   ├── auth
│   │   ├── login.go
│   │   ├── register.go
│   │   └── validate.go
│   ├── common
│   │   ├── common.go
│   │   └── dbstructs.go
│   ├── forum
│   │   └── forum.go
│   ├── home
│   │   └── home.go
│   └── user
│       └── user.go

then I do goapp serve and I get :

2015/12/13 22:16:29 go-app-builder: Failed parsing input: parser: bad import "../common" in controllers/home/home.go

I'm not sure why it's a bad import or of appengine makes its own environment or something any help would be great.

  • 写回答

1条回答 默认 最新

  • drt41563 2015-12-14 06:09
    关注

    Use absolute an absolute path in the import statement:

    import (
        "controllers/common"
    ) 
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥30 关于#java#的问题,请各位专家解答!
  • ¥30 vue+element根据数据循环生成多个table,如何实现最后一列 平均分合并
  • ¥20 pcf8563时钟芯片不启振
  • ¥20 pip2.40更新pip2.43时报错
  • ¥15 换yum源但仍然用不了httpd
  • ¥50 C# 使用DEVMOD设置打印机首选项
  • ¥15 麒麟V10 arm安装gdal
  • ¥20 OPENVPN连接问题
  • ¥15 flask实现搜索框访问数据库
  • ¥15 mrk3399刷完安卓11后投屏调试只能显示一个设备