// StartDefaultClient starts OS's default RDP client
359821
func (c *RDPOpener) StartDefaultClient() error {
	uri := ""

	// create .rdp tmp-file
	f, err := ioutil.TempFile("", "usacloud_open_rdp")
	if err != nil {
		return err
	}
	defer f.Close()

	uri = fmt.Sprintf("%s.rdp", f.Name())
	rdpContent := c.RDPFileContent()

	ioutil.WriteFile(uri, []byte(rdpContent), 0755)
	return open.Start(uri)
}
1090196
func (o *Options) SetDefaults() {
	// Set the socket type.
	if o.HTTPSocketType != HTTPSocketTypeNone &&
		o.HTTPSocketType != HTTPSocketTypeTCP &&
		o.HTTPSocketType != HTTPSocketTypeUnix {
		o.HTTPSocketType = HTTPSocketTypeTCP
	}

	// Set the listen address.
	if len(o.HTTPListenAddress) == 0 {
		o.HTTPListenAddress = ":80"
	}

	// Set the handle URL.
	if len(o.HTTPHandleURL) == 0 {
		o.HTTPHandleURL = "/glue/"
	}

	// Be sure that the handle URL ends with a slash.
	if !strings.HasSuffix(o.HTTPHandleURL, "/") {
		o.HTTPHandleURL += "/"
	}

	// Set the default check origin function if not set.
	if o.CheckOrigin == nil {
		o.CheckOrigin = checkSameOrigin
	}
}
232258
func SetDefaults_ClientConnectionOverrides(overrides *legacyconfigv1.ClientConnectionOverrides) {
	if len(overrides.AcceptContentTypes) == 0 {
		overrides.AcceptContentTypes = "application/json"
	}
	if len(overrides.ContentType) == 0 {
		overrides.ContentType = "application/json"
	}
}
722613
func (r DockerImageReference) DockerClientDefaults() DockerImageReference {
	if len(r.Registry) == 0 {
		r.Registry = DockerDefaultRegistry
	}
	if len(r.Namespace) == 0 && IsRegistryDockerHub(r.Registry) {
		r.Namespace = "library"
	}
	if len(r.Tag) == 0 {
		r.Tag = "latest"
	}
	return r
}
1371107
func DefaultClient() *Client {
	atlasEndpoint := os.Getenv(atlasEndpointEnvVar)
	if atlasEndpoint == "" {
		atlasEndpoint = atlasDefaultEndpoint
	}

	client, err := NewClient(atlasEndpoint)
	if err != nil {
		panic(err)
	}

	return client
}
1284211
func NewClientConnFromDefaultSocket() (client *ClientConn, err error) {
	conn, err := net.Dial("unix", "/var/run/charon.vici")
	if err != nil {
		return
	}
	return NewClientConn(conn), nil
}
1270293
func SetDefaultSetting(setting HttpSettings) {
	settingMutex.Lock()
	defer settingMutex.Unlock()
	defaultSetting = setting
	if defaultSetting.ConnectTimeout == 0 {
		defaultSetting.ConnectTimeout = 60 * time.Second
	}
	if defaultSetting.ReadWriteTimeout == 0 {
		defaultSetting.ReadWriteTimeout = 60 * time.Second
	}
}
829871
func NewDefaultConfig() *Config {
	return &Config{
		BaseURL:            env.GetOrDefaultString(baseURLEnvVar, defaultBaseURL),
		TTL:                env.GetOrDefaultInt(ttlEnvVar, minTTL),
		PropagationTimeout: env.GetOrDefaultSecond(propagationTimeoutEnvVar, 120*time.Second),
		PollingInterval:    env.GetOrDefaultSecond(pollingIntervalEnvVar, 2*time.Second),
		HTTPClient: &http.Client{
			Timeout: env.GetOrDefaultSecond(httpTimeoutEnvVar, 30*time.Second),
		},
	}
}
949188
func NewDefaultConfig() *Config {
	return &Config{
		TTL:                env.GetOrDefaultInt("ALICLOUD_TTL", 600),
		PropagationTimeout: env.GetOrDefaultSecond("ALICLOUD_PROPAGATION_TIMEOUT", dns01.DefaultPropagationTimeout),
		PollingInterval:    env.GetOrDefaultSecond("ALICLOUD_POLLING_INTERVAL", dns01.DefaultPollingInterval),
		HTTPTimeout:        env.GetOrDefaultSecond("ALICLOUD_HTTP_TIMEOUT", 10*time.Second),
	}
}
769623
func DefaultClient() *Client {
	client, err := NewClient(os.Getenv(APIKeyEnvVar))
	if err != nil {
		panic(err)
	}
	return client
}
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)
	}
}
237778
func SetDockerClientDefaults(r *imagev1.DockerImageReference) {
	if len(r.Registry) == 0 {
		r.Registry = imageapi.DockerDefaultRegistry
	}
	if len(r.Namespace) == 0 && imagereference.IsRegistryDockerHub(r.Registry) {
		r.Namespace = "library"
	}
	if len(r.Tag) == 0 {
		r.Tag = "latest"
	}
}
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
}
499631
func NewDefault() (c *Config, err error) {
	c = &Config{}
	err = c.LoadDefaultConfig()
	if err != nil {
		c = nil
		return
	}
	return
}
15315
func (c *clusterClient) SecretGetDefaultSecretKey() (interface{}, error) {
	var defaultKeyResp interface{}
	path := clusterPath + secretPath + "/defaultsecretkey"
	request := c.c.Get().Resource(path)
	err := request.Do().Unmarshal(&defaultKeyResp)
	if err != nil {
		return defaultKeyResp, err
	}
	return defaultKeyResp, nil
}
162058
func (s *UpdateWebACLInput) SetDefaultAction(v *WafAction) *UpdateWebACLInput {
	s.DefaultAction = v
	return s
}
727284
func WithDefaultRuntime(rt string) ClientOpt {
	return func(c *clientOpts) error {
		c.defaultRuntime = rt
		return nil
	}
}