setID sets the error id on the request
(errorID string)
| 71 | |
| 72 | // setID sets the error id on the request |
| 73 | func (e Errors) setID(errorID string) { |
| 74 | for _, err := range e { |
| 75 | err.ID = errorID |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | // WriteError writes a jsonapi error message to the client |
| 80 | func WriteError(w http.ResponseWriter, code int, err error) { |