open-vault/vendor/github.com/michaelklishin/rabbit-hole/error.go

14 lines
276 B
Go
Raw Normal View History

2017-03-31 00:03:13 +00:00
package rabbithole
import "fmt"
type ErrorResponse struct {
StatusCode int
Message string `json:"error"`
Reason string `json:"reason"`
}
func (rme ErrorResponse) Error() string {
return fmt.Sprintf("Error %d (%s): %s", rme.StatusCode, rme.Message, rme.Reason)
}