13 lines
217 B
Go
13 lines
217 B
Go
package server
|
|
|
|
import (
|
|
"fmt"
|
|
"net/http"
|
|
)
|
|
|
|
func errorPage(err error, status int) http.HandlerFunc {
|
|
return func(w http.ResponseWriter, r *http.Request) {
|
|
w.WriteHeader(status)
|
|
fmt.Fprint(w, err.Error())
|
|
}
|
|
}
|