gophertype/pkg/responses/errors.go

10 lines
215 B
Go
Raw Normal View History

2019-11-15 03:03:56 +00:00
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))
}