Created
October 1, 2014 18:20
-
-
Save zenazn/dbf36761d664d1ceec78 to your computer and use it in GitHub Desktop.
App Engine + Go version build tags
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// +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())) | |
}) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// +build thistagdoesnotexist | |
package hello | |
import "net/http" | |
func init() { | |
http.HandleFunc("/tags", func(w http.ResponseWriter, r *http.Request) { | |
w.Write([]byte("wat")) | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is deployed at http://cogent-genre-720.appspot.com/