// NewDefault builds a new report indexing the last sample value
// available.
552446
func NewDefault(prof *profile.Profile, options Options) *Report {
	index := len(prof.SampleType) - 1
	o := &options
	if o.Title == "" && len(prof.Mapping) > 0 && prof.Mapping[0].File != "" {
		o.Title = filepath.Base(prof.Mapping[0].File)
	}
	o.SampleType = prof.SampleType[index].Type
	o.SampleUnit = strings.ToLower(prof.SampleType[index].Unit)
	o.SampleValue = func(v []int64) int64 {
		return v[index]
	}
	return New(prof, o)
}
743301
func NewDefault(Stmts []node.Node) *Default {
	return &Default{
		FreeFloating: nil,
		Stmts:        Stmts,
	}
}
927885
func (i *UI) setDefault() {
	// Set the default writer & reader if not provided
	if i.Writer == nil {
		i.Writer = defaultWriter
	}

	if i.Reader == nil {
		i.Reader = defaultReader
	}

	if i.bReader == nil {
		i.bReader = bufio.NewReader(i.Reader)
	}
}
499631
func NewDefault() (c *Config, err error) {
	c = &Config{}
	err = c.LoadDefaultConfig()
	if err != nil {
		c = nil
		return
	}
	return
}
1157705
func NewDefaulter(id string, log bool) Defaulter {
	return &defaulter{
		id:  id,
		log: log,
	}
}
1331056
func (e Entry) Uint32Default(def uint32) (uint32, error) {
	v := e.ValueRaw
	if v == nil {
		return def, errFindParse.Format("uint32", e.Key)
	}

	switch vv := v.(type) {
	case string:
		val, err := strconv.ParseUint(vv, 10, 32)
		if err != nil {
			return def, err
		}
		if val > math.MaxUint32 {
			return def, errFindParse.Format("uint32", e.Key)
		}
		return uint32(val), nil
	case uint:
		if vv > math.MaxUint32 {
			return def, errFindParse.Format("uint32", e.Key)
		}
		return uint32(vv), nil
	case uint8:
		return uint32(vv), nil
	case uint16:
		return uint32(vv), nil
	case uint32:
		return vv, nil
	case uint64:
		if vv > math.MaxUint32 {
			return def, errFindParse.Format("uint32", e.Key)
		}
		return uint32(vv), nil
	case int32:
		return uint32(vv), nil
	case int64:
		if vv < 0 || vv > math.MaxUint32 {
			return def, errFindParse.Format("uint32", e.Key)
		}
		return uint32(vv), nil
	}

	return def, errFindParse.Format("uint32", e.Key)
}
98946
func (p *Pollster) EnterDefault(valueName, defVal string) (string, error) {
	return p.EnterVerifyDefault(valueName, nil, defVal)
}
108626
func NewDefaultConfig() *Config {
	return &Config{
		IdentityEndpoint:   env.GetOrDefaultString("OTC_IDENTITY_ENDPOINT", defaultIdentityEndpoint),
		PropagationTimeout: env.GetOrDefaultSecond("OTC_PROPAGATION_TIMEOUT", dns01.DefaultPropagationTimeout),
		PollingInterval:    env.GetOrDefaultSecond("OTC_POLLING_INTERVAL", dns01.DefaultPollingInterval),
		TTL:                env.GetOrDefaultInt("OTC_TTL", minTTL),
		HTTPClient: &http.Client{
			Timeout: env.GetOrDefaultSecond("OTC_HTTP_TIMEOUT", 10*time.Second),
			Transport: &http.Transport{
				Proxy: http.ProxyFromEnvironment,
				DialContext: (&net.Dialer{
					Timeout:   30 * time.Second,
					KeepAlive: 30 * time.Second,
					DualStack: true,
				}).DialContext,
				MaxIdleConns:          100,
				IdleConnTimeout:       90 * time.Second,
				TLSHandshakeTimeout:   10 * time.Second,
				ExpectContinueTimeout: 1 * time.Second,

				// Workaround for keep alive bug in otc api
				DisableKeepAlives: true,
			},
		},
	}
}
736633
func NewDefaultConfig() *Config {
	return &Config{
		TTL:                env.GetOrDefaultInt("DNSMADEEASY_TTL", dns01.DefaultTTL),
		PropagationTimeout: env.GetOrDefaultSecond("DNSMADEEASY_PROPAGATION_TIMEOUT", dns01.DefaultPropagationTimeout),
		PollingInterval:    env.GetOrDefaultSecond("DNSMADEEASY_POLLING_INTERVAL", dns01.DefaultPollingInterval),
		HTTPClient: &http.Client{
			Timeout: env.GetOrDefaultSecond("DNSMADEEASY_HTTP_TIMEOUT", 10*time.Second),
			Transport: &http.Transport{
				TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
			},
		},
	}
}
655131
func NewDefaultConfig() *Config {
	return &Config{
		TTL:                env.GetOrDefaultInt("DESIGNATE_TTL", 10),
		PropagationTimeout: env.GetOrDefaultSecond("DESIGNATE_PROPAGATION_TIMEOUT", 10*time.Minute),
		PollingInterval:    env.GetOrDefaultSecond("DESIGNATE_POLLING_INTERVAL", 10*time.Second),
	}
}
851369
func (s *Rule) SetIsDefault(v bool) *Rule {
	s.IsDefault = &v
	return s
}
250739
func SetDefault(sid *Shortid) {
	target := (*unsafe.Pointer)(unsafe.Pointer(&shortid))
	source := unsafe.Pointer(sid)
	atomic.SwapPointer(target, source)
}
1041130
func (e Entry) IntDefault(def int) (int, error) {
	v := e.ValueRaw
	if v == nil {
		return def, fmt.Errorf(errFindParse, "int", e.Key)
	}
	if vint, ok := v.(int); ok {
		return vint, nil
	} else if vstring, sok := v.(string); sok && vstring != "" {
		vint, err := strconv.Atoi(vstring)
		if err != nil {
			return def, err
		}

		return vint, nil
	}

	return def, fmt.Errorf(errFindParse, "int", e.Key)
}
396701
func newDefaultConfig(url string, timeoutms int, config *RealisConfig) (*RealisConfig, error) {
	return newTJSONConfig(url, timeoutms, config)
}
1127569
func (m *Module) ConnectDefault() (*sql.DB, error) {
	ds, err := m.GetBackend(m.env.String())
	if err != nil {
		return nil, err
	}
	return ds.Connect()
}
117879
func (r *Reader) IntDefault(name string, def int) int {
	i, err := r.readInt(name)
	if err != nil {
		return def
	}
	return i
}
843156
func (i Isolation) IsDefault() bool {
	return strings.ToLower(string(i)) == "default" || string(i) == ""
}