Can't find import "google.golang.org/appengine"

361 views
Skip to first unread message

wil...@voodoo.io

unread,
May 2, 2017, 1:57:55 PM5/2/17
to Google App Engine
I'm trying to deploy an API on AppEngine but I'm not sure why it's not working, here's an extract of the code:

package main

import (
   
"encoding/json"
   
"io/ioutil"
   
"net/http"
   
"fmt"

   
"google.golang.org/appengine"
)


func main
() {
   
InitPubSub()

    http
.HandleFunc("/", HandlerBase)
    http
.HandleFunc("/user", HandlerUser)
    http
.HandleFunc("/event", HandlerEvent)

    appengine
.Main()
}

I'm getting the following error when I try to deploy the app (gcloud app deploy): main.go:9: can't find import: "google.golang.org/appengine"

I've followed the installation guide: https://cloud.google.com/appengine/docs/standard/go/download

And downloaded the appengine package: go get google.golang.org/appengine

Thanks!

wil...@voodoo.io

unread,
May 2, 2017, 1:58:05 PM5/2/17
to Google App Engine
Hello,

George (Cloud Platform Support)

unread,
May 2, 2017, 3:29:24 PM5/2/17
to Google App Engine
Hello William, 

Developers are aware of this issue and are actively contributing towards a solid solution to it. In the meanwhile, you should be able to use "goapp deploy" instead of the gcloud command. 

Let me know how that works!

wil...@voodoo.io

unread,
May 3, 2017, 12:13:55 PM5/3/17
to Google App Engine
It works fine with "goapp deploy", thanks!
I have another error, but I'll open another question for that.

Thanks again!
Reply all
Reply to author
Forward
0 new messages