Skip to content

Instantly share code, notes, and snippets.

@zenazn
Created October 1, 2014 18:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zenazn/dbf36761d664d1ceec78 to your computer and use it in GitHub Desktop.
Save zenazn/dbf36761d664d1ceec78 to your computer and use it in GitHub Desktop.
App Engine + Go version build tags
// +build go1.3
package hello
import (
"net/http"
"runtime"
)
func init() {
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte(runtime.Version()))
})
}
// +build thistagdoesnotexist
package hello
import "net/http"
func init() {
http.HandleFunc("/tags", func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("wat"))
})
}
@zenazn
Copy link
Author

zenazn commented Oct 1, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment