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.
|
- package impart
-
- import (
- "net/http"
- )
-
- // HTTPError holds an HTTP status code and an error message.
- type HTTPError struct {
- Status int
- Message string
- }
-
- // Error displays the HTTPError's error message and satisfies the error
- // interface.
- func (h HTTPError) Error() string {
- if h.Message == "" {
- return http.StatusText(h.Status)
- }
- return h.Message
- }
|