Move httpError func to generic.go
parent
01c037a7a2
commit
422a850354
@ -1,11 +0,0 @@
|
|||||||
package api
|
|
||||||
|
|
||||||
import (
|
|
||||||
"log"
|
|
||||||
"net/http"
|
|
||||||
)
|
|
||||||
|
|
||||||
func httpError(w http.ResponseWriter, r *http.Request, err error, code int) {
|
|
||||||
log.Printf("%s: %s\n", r.URL.Path, err)
|
|
||||||
http.Error(w, err.Error(), code)
|
|
||||||
}
|
|
Loading…
Reference in New Issue