Datsik
Datsik

Reputation: 14824

Google appengine saying my import is incorrect?

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.

Upvotes: 2

Views: 58

Answers (1)

Thundercat
Thundercat

Reputation: 120951

Use absolute an absolute path in the import statement:

import (
    "controllers/common"
) 

Upvotes: 2

Related Questions