// failDefault is the default failure function.
494013
func failDefault(is *Is, format string, args ...interface{}) {
	is.TB.Helper()

	failFmt := format
	if len(is.failFormat) != 0 {
		failFmt = fmt.Sprintf("%s - %s", format, is.failFormat)
		args = append(args, is.failArgs...)
	}
	if is.strict {
		is.TB.Fatalf(failFmt, args...)
	} else {
		is.TB.Errorf(failFmt, args...)
	}
}
685699
func (s *Profile) SetIsDefault(v bool) *Profile {
	s.IsDefault = &v
	return s
}
767514
func (p *Pollster) EnterVerifyDefault(valueName string, verify VerifyFunc, defVal string) (string, error) {
	var verifyDefault VerifyFunc
	if verify != nil {
		verifyDefault = func(s string) (ok bool, errmsg string, err error) {
			if s == "" {
				return true, "", nil
			}
			return verify(s)
		}
	}
	s, err := QueryVerify("Enter "+valueName+" ["+defVal+"]: ", p.scanner, p.out, p.errOut, verifyDefault)
	if err != nil {
		return "", errors.Trace(err)
	}
	if s == "" {
		return defVal, nil
	}
	return s, nil
}
698439
func (r *Reader) Int64Default(name string, def int64) int64 {
	i, err := r.readInt64(name)
	if err != nil {
		return def
	}
	return i
}
676015
func (e Entry) Int64Default(def int64) (int64, error) {
	v := e.ValueRaw
	if v == nil {
		return def, fmt.Errorf(errFindParse, "int64", e.Key)
	}

	if vint64, ok := v.(int64); ok {
		return vint64, nil
	}

	if vint, ok := v.(int); ok {
		return int64(vint), nil
	}

	if vstring, sok := v.(string); sok {
		return strconv.ParseInt(vstring, 10, 64)
	}

	return def, fmt.Errorf(errFindParse, "int64", e.Key)
}
47683
func (c *Config) ReadIntDefault(id string, defaultValue int) int {
	val, err := c.ReadInt(id)
	if err != nil {
		return defaultValue
	}
	return val
}
1135127
func ClientDefault(ops ...func(*tls.Config)) *tls.Config {
	tlsconfig := &tls.Config{
		// Prefer TLS1.2 as the client minimum
		MinVersion:   tls.VersionTLS12,
		CipherSuites: clientCipherSuites,
	}

	for _, op := range ops {
		op(tlsconfig)
	}

	return tlsconfig
}
1204689
func filterDefault(ctx stick.Context, val stick.Value, args ...stick.Value) stick.Value {
	var d stick.Value
	if len(args) > 0 {
		d = args[0]
	}
	if stick.CoerceString(val) == "" {
		return d
	}
	return val
}
1083708
func (s *SdkConfigurationProperty) SetDefaultValue(v string) *SdkConfigurationProperty {
	s.DefaultValue = &v
	return s
}
47534
func (e Entry) Int8Default(def int8) (int8, error) {
	v := e.ValueRaw
	if v == nil {
		return def, errFindParse.Format("int8", e.Key)
	}

	switch vv := v.(type) {
	case string:
		val, err := strconv.ParseInt(vv, 10, 8)
		if err != nil {
			return def, err
		}
		return int8(val), nil
	case int:
		return int8(vv), nil
	case int8:
		return vv, nil
	case int16:
		return int8(vv), nil
	case int32:
		return int8(vv), nil
	case int64:
		return int8(vv), nil
	}

	return def, errFindParse.Format("int8", e.Key)
}
293451
func GetDefault() *Shortid {
	return (*Shortid)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(&shortid))))
}
843156
func (i Isolation) IsDefault() bool {
	return strings.ToLower(string(i)) == "default" || string(i) == ""
}
132078
func GetDefaultConfig() *Config {
	mlCfg := memberlist.DefaultLANConfig()
	mlCfg.PushPullInterval = defaultPushPullInterval
	mlCfg.GossipNodes = mlCfg.GossipNodes * 2
	return &Config{
		Name:                      getHostname(),
		Enable:                    defaultEnable,
		BindAddr:                  netutil.GetIP(),
		BindPort:                  defaultBindPort,
		Seed:                      defaultSeed,
		MemberlistConfig:          mlCfg,
		RestAPIProto:              defaultRestAPIProto,
		RestAPIPassword:           defaultRestAPIPassword,
		RestAPIPort:               defaultRestAPIPort,
		RestAPIInsecureSkipVerify: defaultRestAPIInsecureSkipVerify,
	}
}
333795
func (f *BackoffCloneFunc) SetDefaultReturn(r0 backoff.Backoff) {
	f.SetDefaultHook(func() backoff.Backoff {
		return r0
	})
}
1345584
func (c *Config) LoadDefaultConfig() (err error) {

	c.HTTPSettings = DefaultHTTPClientSettings

	err = yaml.Unmarshal([]byte(DefaultConfigFileContent), c)
	if err != nil {
		logger.Errorf(nil, "Config parse error, %v.", err)
		return
	}

	logger.SetLevel(c.LogLevel)

	c.InitHTTPClient()
	return
}
865679
func (m ModuleInstance) ProviderConfigDefault(name string) AbsProviderConfig {
	return AbsProviderConfig{
		Module: m,
		ProviderConfig: ProviderConfig{
			Type: name,
		},
	}
}
510710
func timeoutWithDefault(configuredValue time.Duration, defaultValue time.Duration) time.Duration {
	if configuredValue == 0 {
		return defaultValue
	}
	return configuredValue
}