logmower-shipper/vendor/github.com/montanaflynn/stats/errors.go
rasmus e45bf4739b go mod vendor
+ move k8s.io/apimachinery fork from go.work to go.mod
(and include it in vendor)
2022-11-07 00:26:05 +02:00

36 lines
1.0 KiB
Go

package stats
type statsError struct {
err string
}
func (s statsError) Error() string {
return s.err
}
func (s statsError) String() string {
return s.err
}
// These are the package-wide error values.
// All error identification should use these values.
// https://github.com/golang/go/wiki/Errors#naming
var (
// ErrEmptyInput Input must not be empty
ErrEmptyInput = statsError{"Input must not be empty."}
// ErrNaN Not a number
ErrNaN = statsError{"Not a number."}
// ErrNegative Must not contain negative values
ErrNegative = statsError{"Must not contain negative values."}
// ErrZero Must not contain zero values
ErrZero = statsError{"Must not contain zero values."}
// ErrBounds Input is outside of range
ErrBounds = statsError{"Input is outside of range."}
// ErrSize Must be the same length
ErrSize = statsError{"Must be the same length."}
// ErrInfValue Value is infinite
ErrInfValue = statsError{"Value is infinite."}
// ErrYCoord Y Value must be greater than zero
ErrYCoord = statsError{"Y Value must be greater than zero."}
)