novelty.go

Single word (yes/no) site for app engine in go
git clone https://wehaveforgeathome.hates.computer/novelty.go.git
Log | Files | Refs | LICENSE

commit 6dd456b0e5f6ceedae43a1a953266738778730f3
parent 3243cd09a4448f369b171e4e5cb75a4096de1f67
Author: Ryan Wolf <johnwayne@pseudony.ms>
Date:   Sun,  9 Feb 2020 21:35:51 -0500

change init() to main()

See https://cloud.google.com/appengine/docs/standard/go111/go-differences#writing_a_main_package
Diffstat:
Mnovelty.go | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/novelty.go b/novelty.go @@ -16,10 +16,11 @@ type Password struct { Value string } -func init() { +func main() { http.HandleFunc("/", getAnswer) http.HandleFunc("/yes", setAnswer("yes")) http.HandleFunc("/no", setAnswer("no")) + appengine.Main() } func getAnswer(w http.ResponseWriter, r *http.Request) {