I cannot deploy Go module in App Engine using google.golang.org/appengine modules

From the last material that I can read, and also based on documentation on some APIs (for example, the Datastore Go API , m is supposed to be used google.golang.org/appengine, etc. instead of the old paths appengine/.... However, when I try to deploy using the gcloud application deployment, I get the following error:

The deployment contains files that cannot be compiled: compilation failed:

2016/01/14 14:32:43 go-app-builder: build timing: 2Γ—6g (113ms total), 0Γ—6l (0 total)
2016/01/14 14:32:43 go-app-builder: failed running 6g: exit status 1

server/alexa.go:10: can't find import: "golang.org/x/net/context"

The package golang.org/x/net/contextsupposedly replaces the old appengine/contextone, but it does not appear on the deployment server GOROOT.

I tried to include all the dependencies and their dependencies in my package repo, but this only led me to this obscure error (the directory he complains about actually exists):

The deployment contains files that cannot be compiled: compilation failed:

2016/01/14 14:27:04 go-app-builder: build timing: 18Γ—6g (1.819s total), 0Γ—6l (0 total)
2016/01/14 14:27:04 go-app-builder: failed running 6g: exit status 1

github.com/golang/protobuf/protoc-gen-go/testdata/my_test/test.pb.go:27: can't find import: "github.com/golang/protobuf/protoc-gen-go/testdata/multi"

I misunderstood the documentation and should I use only old packages?

+4
source share
3 answers

go get golang.org/x/net/context, go src. , App Engine . , , App Engine, Engine Compute Engine. , , API- RESTful, Google . Google, , App Engine , Blobstore . , .

+2

gosdk, goapp get , .go , gosdk. , .

, gosdk\gopath\src

, :

go install: C:\_current_directory GOPATH          .: go help gopath

+1

​​ gcloud 142. gcloud beta app deploy --project <project> app.yaml. gcloud components update .

0
source

Source: https://habr.com/ru/post/1624370/


All Articles