You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
quartermaster/pkg/api/home.go

22 lines
562 B

package api
import (
"fmt"
"log"
"net/http"
)
func homePage(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
w.Header().Set("Content-Type", "application/json")
fmt.Fprintf(w, "{\"status\": \"success\"}")
log.Println("{\"endpoint\": \"/\", \"status\": \"success\"}")
}
func healthcheck(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
w.Header().Set("Content-Type", "application/json")
fmt.Fprintf(w, "{\"status\": \"success\"}")
log.Println("{\"endpoint\": \"/healthcheck\", \"status\": \"success\"}")
}