func Problem(w http.ResponseWriter, r *http.Request, title, detail string, code int, extras ...ProblemExtra) {

	p := problem{
		fields: map[string]interface{}{
			"type":   "about:blank", // RFC 7807 defines this as the default type value.
			"title":  title,
			"detail": detail,
			"status": code,
		},
	}

	// Apply all extras to the response struct
	for _, e := range extras {
		e(&p)
	}

	// Set the correct content-type header, as defined by RFC 7807.
	w.Header().Set("Content-Type", "application/problem+json")

	Respond(w, r, code, p)
}
// Problem responds to HTTP request with a response that follows RFC 7807 (https://tools.ietf.org/html/rfc7807).
// It should be used for error responses.
Problem responds to HTTP request with a response that follows RFC 7807 .
It should be used for error responses.
// Problem responds to HTTP request with a response that follows RFC 7807 ( https : // tools . ietf . org / html / rfc7807 ) . // It should be used for error responses .
func Problem(w http.ResponseWriter, r *http.Request, title, detail string, code int, extras ...ProblemExtra) {
	p := problem{
		fields: map[string]interface{}{
			"type":   "about:blank", 
			"title":  title,
			"detail": detail,
			"status": code,
		},
	}
	for _, e := range extras {
		e(&p)
	}
	w.Header().Set("Content-Type", "application/problem+json")
	Respond(w, r, code, p)
}
func Problem ( w http . ResponseWriter , r * http . Request , title , detail string , code int , extras ... ProblemExtra ) { p := problem { fields : map [ string ] interface { } { " " : " " , " " : title , " " : detail , " " : code , } , } for _ , e := range extras { e ( & p ) } w . Header ( ) . Set ( " " , " " ) Respond ( w , r , code , p ) }
Problem responds to HTTP request with a response that follows RFC 7807 .
Problem responds to HTTP request with a response that follows RFC 7807 .
// RFC 7807 defines this as the default type value. // Apply all extras to the response struct // Set the correct content-type header, as defined by RFC 7807.