Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for IsNegativeDuration (0.12 sec)

  1. pkg/config/validation/validation.go

    func ValidateMaxServerConnectionAge(in time.Duration) error {
    	if err := IsNegativeDuration(in); err != nil {
    		return fmt.Errorf("%v: --keepaliveMaxServerConnectionAge only accepts positive duration eg: 30m", err)
    	}
    	return nil
    }
    
    // IsNegativeDuration check if the duration is negative
    func IsNegativeDuration(in time.Duration) error {
    	if in < 0 {
    		return fmt.Errorf("invalid duration: %s", in.String())
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Jun 12 04:03:33 UTC 2024
    - 107.2K bytes
    - Viewed (0)
Back to top