1
0
Fork 0
mirror of https://github.com/Luzifer/staticmap.git synced 2024-10-19 16:14:22 +00:00
staticmap/vendor/github.com/didip/tollbooth/errors/errors.go
Knut Ahlers 20365966c7
Add new dependencies
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2017-06-27 23:10:11 +02:00

15 lines
370 B
Go

// Package errors provide data structure for errors.
package errors
import "fmt"
// HTTPError is an error struct that returns both message and status code.
type HTTPError struct {
Message string
StatusCode int
}
// Error returns error message.
func (httperror *HTTPError) Error() string {
return fmt.Sprintf("%v: %v", httperror.StatusCode, httperror.Message)
}