mirror of
https://github.com/pagefaultgames/rogueserver.git
synced 2025-02-19 23:21:29 +08:00
12 lines
207 B
Go
12 lines
207 B
Go
![]() |
package api
|
||
|
|
||
|
import (
|
||
|
"log"
|
||
|
"net/http"
|
||
|
)
|
||
|
|
||
|
func httpError(w http.ResponseWriter, r *http.Request, error string, code int) {
|
||
|
log.Printf("%s: %s %d\n", r.URL.Path, error, code)
|
||
|
http.Error(w, error, code)
|
||
|
}
|