Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateFraction ¶
func ValidatePercent ¶
Types ¶
type FloatLimiter ¶
type FloatLimiter struct {
// contains filtered or unexported fields
}
* Helper structure for validating float values. It can be used to * check whether a floating point value is in a given range.
func NewFloatLimiter ¶
func NewFloatLimiter(min, max float64) (f FloatLimiter)
func (FloatLimiter) InRange ¶
func (f FloatLimiter) InRange(val float64) (b bool)
func (FloatLimiter) InRangeErr ¶
func (f FloatLimiter) InRangeErr(val float64) (err error)
func (FloatLimiter) Limit ¶
func (f FloatLimiter) Limit(val float64) (fl float64)
func (FloatLimiter) LimitTo ¶
func (f FloatLimiter) LimitTo(val *float64)
type NotInRange ¶
type NotInRange struct {
// contains filtered or unexported fields
}
func (NotInRange) Error ¶
func (e NotInRange) Error() (s string)
Click to show internal directories.
Click to hide internal directories.