Untitled

 avatar
unknown
golang
4 years ago
486 B
4
Indexable
// Declare a handler which writes a plain-text response with information about the
// application status, operating environment and version.
func (app *application) healthcheckHandler(w http.ResponseWriter, r *http.Request) {
	fmt.Fprintln(w, "status: available")
	fmt.Fprintf(w, "environment: %s\n", app.config.env)
	fmt.Fprintf(w, "version: %s\n", version)

	fmt.Fprintf(w, "haleala: %s \n", app.config.haleala)
	fmt.Fprintf(w, "cati cozonaci ai halit %d \n", app.config.nrCozonaci)
}
Editor is loading...