A web blog and personal homepage engine written in Go.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

10 lines
215 B

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