- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for ValidatePercent (0.26 sec)
-
pkg/config/validation/validation.go
// validateWeight checks if weight is valid func validateWeight(weight int32) error { if weight < 0 { return fmt.Errorf("weight %d < 0", weight) } return nil } // ValidatePercent checks that percent is in range func ValidatePercent(val int32) error { if val < 0 || val > 100 { return fmt.Errorf("percentage %v is not in range 0..100", val) } return nil }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Jun 12 04:03:33 UTC 2024 - 107.2K bytes - Viewed (0)