func (f *Flags) SamplingConfig() *zap.SamplingConfig {
	i, iok := f.LookupSamplingInitial()
	t, tok := f.LookupSamplingThereafter()

	if !iok && !tok {
		return nil
	}

	switch {
	case !iok:
		i = t
	case !tok:
		t = i
	}

	if t < 1 {
		t = 1
	}

	return &zap.SamplingConfig{Initial: i, Thereafter: t}
}
// SamplingConfig returns *zap.SamplingConfig.
// If at least one of f.FlagSamplingInitial or f.FlagSamplingThereafter is set,
// it returns non-nil value.  Otherwise returns nil.
// The value that is not specified is same as the other value.
// The value of thereafter will not be less than 1.
SamplingConfig returns *zap.SamplingConfig.
If at least one of f.FlagSamplingInitial or f.FlagSamplingThereafter is set,
it returns non-nil value.  Otherwise returns nil.
The value that is not specified is same as the other value.
The value of thereafter will not be less than 1.
// SamplingConfig returns * zap . SamplingConfig . // If at least one of f . FlagSamplingInitial or f . FlagSamplingThereafter is set // it returns non - nil value . Otherwise returns nil . // The value that is not specified is same as the other value . // The value of thereafter will not be less than 1 .
func (f *Flags) SamplingConfig() *zap.SamplingConfig {
	i, iok := f.LookupSamplingInitial()
	t, tok := f.LookupSamplingThereafter()
	if !iok && !tok {
		return nil
	}
	switch {
	case !iok:
		i = t
	case !tok:
		t = i
	}
	if t < 1 {
		t = 1
	}
	return &zap.SamplingConfig{Initial: i, Thereafter: t}
}
func ( f * Flags ) SamplingConfig ( ) * zap . SamplingConfig { i , iok := f . LookupSamplingInitial ( ) t , tok := f . LookupSamplingThereafter ( ) if ! iok && ! tok { return nil } switch { case ! iok : i = t case ! tok : t = i } if t < 1 { t = 1 } return & zap . SamplingConfig { Initial : i , Thereafter : t } }
SamplingConfig returns *zap.SamplingConfig.
SamplingConfig returns * zap . SamplingConfig .