func (cfg TokenizerConfig) validate(key interface{}) error {
	switch {
	case key == nil:
		return fmt.Errorf("log required")
	case cfg.TimeFunc == nil:
		return fmt.Errorf("time func required")
	case cfg.ValidSec <= 0:
		return fmt.Errorf("non-negative valid seconds required")
	}
	return nil
}
// validate ensures the configuration has no errors.
validate ensures the configuration has no errors.
// validate ensures the configuration has no errors .
func (cfg TokenizerConfig) validate(key interface{}) error {
	switch {
	case key == nil:
		return fmt.Errorf("log required")
	case cfg.TimeFunc == nil:
		return fmt.Errorf("time func required")
	case cfg.ValidSec <= 0:
		return fmt.Errorf("non-negative valid seconds required")
	}
	return nil
}
func ( cfg TokenizerConfig ) validate ( key interface { } ) error { switch { case key == nil : return fmt . Errorf ( " " ) case cfg . TimeFunc == nil : return fmt . Errorf ( " " ) case cfg . ValidSec <= 0 : return fmt . Errorf ( " " ) } return nil }
validate ensures the configuration has no errors.
validate ensures the configuration has no errors .