googlecloudplatform / appengine-guestbook-go Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
Without prefixing the appengine
and appengine/user
packages with google.golang.org
I receive the error cannot find package "appengine"
on running go build
and also in my vim syntax checker (I use vim-go).
Perhaps the sample code should include this prefix?
Hi there,
I'm trying to follow this tutorial: https://cloud.google.com/appengine/docs/standard/go/getting-started/creating-guestbook.
However, I'm failing hard... With the following error:
INFO 2017-11-14 08:52:10,266 devappserver2.py:105] Skipping SDK update check.
INFO 2017-11-14 08:52:10,619 api_server.py:300] Starting API server at: http://localhost:61603
INFO 2017-11-14 08:52:11,201 dispatcher.py:251] Starting module "default" running at: http://localhost:8080
INFO 2017-11-14 08:52:11,209 admin_server.py:116] Starting admin server at: http://localhost:8000
ERROR 2017-11-14 08:52:12,327 instance_factory.py:194] Failed to build Go application: (Executed command: /usr/local/google-cloud-sdk/platform/google_appengine/goroot-1.8/bin/go-app-builder -app_base /Users/freekvandooren/GoglandProjects/appengine-guestbook-go -api_version go1 -arch 6 -dynamic -goroot /usr/local/google-cloud-sdk/platform/google_appengine/goroot-1.8 -gopath /usr/local/google-cloud-sdk/platform/google_appengine/gopath -nobuild_files ^^$ -incremental_rebuild -unsafe -binary_name _go_app -extra_imports appengine_internal/init -work_dir /var/folders/hd/w6gynpy55nbcr4x_wk13sn6c0000gn/T/tmpau3igRappengine-go-bin -gcflags -I,/usr/local/google-cloud-sdk/platform/google_appengine/goroot-1.8/pkg/darwin_amd64_appengine -ldflags -L,/usr/local/google-cloud-sdk/platform/google_appengine/goroot-1.8/pkg/darwin_amd64_appengine hello.go)
/var/folders/hd/w6gynpy55nbcr4x_wk13sn6c0000gn/T/tmpau3igRappengine-go-bin/hello.go:8: can't find import: "golang.org/x/net/context"
2017/11/14 09:52:12 Can't find package "golang.org/x/net/context" in $GOPATH: cannot find package "golang.org/x/net/context" in any of:
/usr/local/google-cloud-sdk/platform/google_appengine/goroot-1.8/src/golang.org/x/net/context (from $GOROOT)
/usr/local/google-cloud-sdk/platform/google_appengine/gopath/src/golang.org/x/net/context (from $GOPATH)
2017/11/14 09:52:12 Can't find package "google.golang.org/appengine" in $GOPATH: cannot find package "google.golang.org/appengine" in any of:
/usr/local/google-cloud-sdk/platform/google_appengine/goroot-1.8/src/google.golang.org/appengine (from $GOROOT)
/usr/local/google-cloud-sdk/platform/google_appengine/gopath/src/google.golang.org/appengine (from $GOPATH)
2017/11/14 09:52:12 Can't find package "google.golang.org/appengine/datastore" in $GOPATH: cannot find package "google.golang.org/appengine/datastore" in any of:
/usr/local/google-cloud-sdk/platform/google_appengine/goroot-1.8/src/google.golang.org/appengine/datastore (from $GOROOT)
/usr/local/google-cloud-sdk/platform/google_appengine/gopath/src/google.golang.org/appengine/datastore (from $GOPATH)
2017/11/14 09:52:12 Can't find package "google.golang.org/appengine/user" in $GOPATH: cannot find package "google.golang.org/appengine/user" in any of:
/usr/local/google-cloud-sdk/platform/google_appengine/goroot-1.8/src/google.golang.org/appengine/user (from $GOROOT)
/usr/local/google-cloud-sdk/platform/google_appengine/gopath/src/google.golang.org/appengine/user (from $GOPATH)
2017/11/14 09:52:12 go-app-builder: build timing: 0×skip (0s total), 1×compile (61ms total), 0×link (0s total)
2017/11/14 09:52:12 go-app-builder: failed running compile: exit status 2
I'm also new to the Go language, so that is not particularly helpful, but I am thinking this tutorial probably did work when the cloud sdk was still using Go 1.6.
I have experimented with cloning from their respective repositories the imports on which the program is failing, which did seem to fix the immediate import problem, but then I ran into other issues, so I felt out of my depth.
Is there a way to switch the cloud sdk to Go 1.6? Alternatively, was I on the right track cloning those repositories, but somehow missing another step?
Thank you in advance for any help you can offer.
Regards,
Freek
PS.
I feel I should mention I also installed Go 1.9 on a different track trying to learn Go.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.