如何在Golang中将Bundle用于Google App Engine或引用自定义依赖项

Currently I'm using the bunch to do npm style type builds as well as using symbolic links in my web project to be able to do builds without have to pull from a git repository.

For example my directory structure is like the following

testapp/ .vendor -controllers --user_controller.go -routers --router.go -models --user.go server.go Bunchfile

so inside the .vendor/src directory

I also have

.vendor/src/example.com/tgo/testapp/routers

So if i don't want to have to duplicate my folders in the .vendor directory I will use a symbolic link - this works great when I do

ln -s ~/Documents/dev/go/testapp/ ~/Documents/dev/go/testapp/.vendor/src/example.com/tgo/

bunch go build

However for Google App Engine - Trying to see if this will work, haven't been able to figure it out yet.

Here is the code for server.go

package main

import (
  "example.com/tgo/testapp/routers"
  "github.com/codegangsta/negroni"
  "net/http"
  "log"
)

func init(){
  //For Google App Engine
  //settings.Init()
  router :=  routers.InitRoutes()
  n := negroni.Classic()
  n.UseHandler(router)
  http.Handle("/", n)
}
func main() {
  router :=  routers.InitRoutes()
  n := negroni.Classic()
  n.UseHandler(router)
  log.Println("Listening......")
  http.ListenAndServe(":3001", n)

}

I actually figured it out the issue has to do with Assigning $GOPATH before you run the upload to App Engine.

So I just have a script that sets the environment Variable $GOPATH to the .vendor directory then run goapp serve or goapp deploy and everything works!

Look forward to moving everything over to app engine!