aboutsummaryrefslogtreecommitdiff
path: root/errors.go
diff options
context:
space:
mode:
authorAlex <alex@scerba.org>2024-03-13 17:09:48 -0400
committerAlex Scerba <alex@scerba.org>2024-10-29 13:20:01 -0400
commitf97d476b495126fd2474b8e3a2968658395d2a0f (patch)
tree866ce2531ea9ada192e01faeecd42fc02bc5b0c1 /errors.go
parent99d92792daedc0501886edc7c4e4a9f3768f9b8a (diff)
Complete restructure
Diffstat (limited to 'errors.go')
-rw-r--r--errors.go23
1 files changed, 0 insertions, 23 deletions
diff --git a/errors.go b/errors.go
deleted file mode 100644
index 9406a9a..0000000
--- a/errors.go
+++ /dev/null
@@ -1,23 +0,0 @@
-package main
-
-import (
- "fmt"
- "net/http"
- "runtime/debug"
-)
-
-func (app *application) serverError(w http.ResponseWriter, err error) {
- trace := fmt.Sprintf("%s\n%s", err.Error(), debug.Stack())
- app.errorLog.Output(2, trace)
-
- http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
-}
-
-func (app *application) clientError(w http.ResponseWriter, status int) {
- app.errorLog.Printf("Clent error: %d\n", status)
- http.Error(w, http.StatusText(status), status)
-}
-
-func (app *application) notFound(w http.ResponseWriter) {
- app.clientError(w, http.StatusNotFound)
-}