gophertype/pkg/responses/errors.go

10 行
215 B
Go

package responses
import "net/http"
// Panic gives a simple error with no template or anything fancy.
func Panic(w http.ResponseWriter, code int, message string) {
w.WriteHeader(code)
w.Write([]byte(message))
}