violet/utils/response.go

11 lines
190 B
Go
Raw Normal View History

2023-04-21 03:21:46 +01:00
package utils
import (
"fmt"
"net/http"
)
func RespondHttpStatus(rw http.ResponseWriter, status int) {
http.Error(rw, fmt.Sprintf("%d %s\n", status, http.StatusText(status)), status)
}