Error creating compilation of appengine cloud storage in demo project
Following https://cloud.google.com/appengine/docs/go/googlecloudstorageclient/getstarted the deployment fails
goapp deploy -oauth
from
app.go:78: cannot use google.AppEngineContext(c) (type "golang.org/x/oauth2".Option) as type "github.com/golang/oauth2".Option in function argument
I can run the demo project by changing import lines 33-34 in google.golang.org/cloud/examples/storage/appengine/app.go
from
"github.com/golang/oauth2"
"github.com/golang/oauth2/google"
to
"golang.org/x/oauth2"
"golang.org/x/oauth2/google"
Most importantly, this is the correct way to "fix" this (and should the demo project be / or be updated by Google?) And if anyone has an understanding, if you could provide some context as to why there is (as it seems to me ) multiple ways to reference the same package, which would be great.
source to share
Yes, go subitems have been moved to golang.org/x/...
See announcement: https://groups.google.com/forum/#!msg/golang-nuts/eD8dh3T9yyA/l5Ail-xfMiAJ
The problem with defining the canonical import path will be addressed in Go 1.4: https://docs.google.com/document/d/1jVFkZTcYbNLaTxXD9OcGfn7vYv5hWtPx9--lTx1gPMs
It seems that there really is a problem with the examples. The oauth library references paths golang.org/x/...
with a recent commit .
source to share