INNER CODE UNIT · Go

UpdateConfig

andrearaponi/dito · config/config.go:247

func UpdateConfig(newConfig *ProxyConfig) {
	currentConfig.Store(newConfig)
	if !newConfig.Logging.Enabled {
		log.SetOutput(io.Discard)
	} else {
		log.SetOutput(os.Stdout)
	}
}

// GetCurrentProxyConfig returns the current proxy configuration.
//
// Returns:
// - *ProxyConfig: A pointer to the current ProxyConfig.
func GetCurrentProxyConfig() *ProxyConfig {
	config := currentConfig.Load()
	if config == nil {
		return nil
	}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…