Q:

cannot find package "appengine/cloudsql"

I develop some GO libraries using Google Cloud SQL and MySQL server. When I imported `appengine/cloudsql, an error below occured.

cloud.go:20:2: cannot find package "appengine/cloudsql" in any of:
    /usr/local/Cellar/go/1.1.2/src/pkg/appengine/cloudsql (from $GOROOT)
    /Users/lameduck/myGo/src/appengine/cloudsql (from $GOPATH)

I know this package, appengine/cloudsql, is only for Google App Engine and it doesn't exist on everywhere else. 
I'm wondering how can I use it for GAE and standard sql library for other environments in a single library.
PS: I can setup Google App Engine SDK correctly. My question is not relevant to it. I hope my library runs on Google App Engine and standalone environment together. (I already made a code for GAE and a code for other dabatases.) It is Ok that users have to setup some configurations. But I don't want that users have to modify a library source code.
Thanks for any help.

A:

I solved the problem. I used a build constraint to use the proper routine and avoid an error. There is a build constraint for App Engine, appengine.

The App Engine SDK introduces a new build constraint term:
  "appengine". Files that specify
// +build appengine will be built by the App Engine SDK and ignored by
  the go tool. Conversely, files that specify
// +build !appengine are ignored by the App Engine SDK, while the go
  tool will happily build them.

PS:
Anway, I upvoted other answers. Thank you.

