This repository has been archived on 2024-04-10. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
elektron/vendor/github.com/montanaflynn/stats/errors.go
Pradyumna Kaushik bac60e872a Unit testing for def/ module.
Added unit tests to test code in def/ module.
2019-10-12 06:48:45 +00:00

26 lines
704 B
Go

package stats
type statsErr struct {
err string
}
func (s statsErr) Error() string {
return s.err
}
func (s statsErr) String() string {
return s.err
}
// These are the package-wide error values.
// All error identification should use these values.
var (
EmptyInputErr = statsErr{"Input must not be empty."}
NaNErr = statsErr{"Not a number."}
NegativeErr = statsErr{"Must not contain negative values."}
ZeroErr = statsErr{"Must not contain zero values."}
BoundsErr = statsErr{"Input is outside of range."}
SizeErr = statsErr{"Must be the same length."}
InfValue = statsErr{"Value is infinite."}
YCoordErr = statsErr{"Y Value must be greater than zero."}
)