lishwist/server/routing/not_found.go

12 lines
262 B
Go

package routing
import (
"net/http"
)
func NotFoundJson(w http.ResponseWriter, r *http.Request) {
w.Header().Add("Content-Type", "application/json; charset=utf-8")
w.WriteHeader(http.StatusNotFound)
_, _ = w.Write([]byte(`{"GeneralError":"Not Found"}`))
}