func handler()

in tutorials/verification-run/app-config/hello-app/main.go [43:54]


func handler(w http.ResponseWriter, r *http.Request) {
	name := os.Getenv("NAME")

	switch name {
	case "Test", "Staging", "Prod":
		fmt.Fprintf(w, "Hello %s! 🎉\n", name)
	default:
		http.Error(w, "Configuration must match target name (Test, Staging, Prod)", 400)
	}

	log.Printf("Sent response, target was '%s'", name)
}