rogueserver/api/error.go

12 lines
207 B
Go
Raw Normal View History

2024-04-07 14:22:34 -07:00
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)
}