1
0
mirror of https://github.com/mainflux/mainflux.git synced 2025-04-26 13:48:53 +08:00
Dušan Borovčanin 677f3c70b0
Update Go version and dependencies (#1663)
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
2022-10-26 15:56:35 +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."}
)