func (s *Spec) Validate() error {
	if len(s.Name) > 40 {
		return errors.NotValidf("Name longer than 40 characters")
	}
	if !validName.MatchString(s.Name) {
		return errors.NotValidf("Name %q", s.Name)
	}
	if s.Clock == nil {
		return errors.NotValidf("missing Clock")
	}
	if s.Delay <= 0 {
		return errors.NotValidf("non positive Delay")
	}
	if s.Timeout < 0 {
		return errors.NotValidf("negative Timeout")
	}
	return nil
}
// Validate checks the attributes of Spec for validity.
Validate checks the attributes of Spec for validity.
// Validate checks the attributes of Spec for validity .
func (s *Spec) Validate() error {
	if len(s.Name) > 40 {
		return errors.NotValidf("Name longer than 40 characters")
	}
	if !validName.MatchString(s.Name) {
		return errors.NotValidf("Name %q", s.Name)
	}
	if s.Clock == nil {
		return errors.NotValidf("missing Clock")
	}
	if s.Delay <= 0 {
		return errors.NotValidf("non positive Delay")
	}
	if s.Timeout < 0 {
		return errors.NotValidf("negative Timeout")
	}
	return nil
}
func ( s * Spec ) Validate ( ) error { if len ( s . Name ) > 40 { return errors . NotValidf ( " " ) } if ! validName . MatchString ( s . Name ) { return errors . NotValidf ( " " , s . Name ) } if s . Clock == nil { return errors . NotValidf ( " " ) } if s . Delay <= 0 { return errors . NotValidf ( " " ) } if s . Timeout < 0 { return errors . NotValidf ( " " ) } return nil }
Validate checks the attributes of Spec for validity.
Validate checks the attributes of Spec for validity .