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

16 lines
370 B
Go
Raw Normal View History

// 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)
}