diff --git a/oblig1/endpoints/error.go b/oblig1/endpoints/error.go new file mode 100644 index 0000000000000000000000000000000000000000..3c1f14c5ce01a3c344b2c99bfcf864dac0832569 --- /dev/null +++ b/oblig1/endpoints/error.go @@ -0,0 +1,8 @@ +package endpoints + +import "net/http" + +func Errorhandler(w http.ResponseWriter, r *http.Request) { + errormes := "Oblig 1\nEndpoints:\n/librarystats/v1/bookcount/?language='iso_code'\n/librarystats/v1/readership/'iso-code'/?limit=<int>\n/librarystats/v1/status/" + http.Error(w, errormes, http.StatusNotFound) +}