I have followed this guide in installing the AppEngine SDK. https://developers.google.com/appengine/docs/go/gettingstarted/introduction
I have originally installed Go 1.2 with Brew (on OSX). I've set my paths:
export GOPATH=$HOME/Documents/go
export PATH=$GOPATH/bin:$PATH
export PATH=$HOME/Documents/go/go_appengine:$PATH
I copy/pasted hello world app, and ran it with goapp serve
. All good.
Now, as soon as I try to use appengine
:
import (
"appengine"
)
I get compile time error:
api.go:5:5: cannot find package "appengine" in any of:
/usr/local/Cellar/go/1.2/libexec/src/pkg/appengine (from $GOROOT)
/Users/jan/Documents/go/src/appengine (from $GOPATH)
The starting guide documentation doesn't say anything about this. It seems like the SDK has its own $GOPATH
like dir with /src
, /pkg
and /bin
. I assume I would have to manually switch the $GOPATH
between SDK and native Go all the time, which doesn't make any sense and doesn't even work for me (as I mostly work on non-appengine stuff).
I am clearly doing something wrong here. What am I missing?
EDIT: It seems like the actual appengine server is compiling and running fine, however my entire setup is broken (testing, Vim...). Is there any workaround?