mirror of
https://github.com/mayswind/ezbookkeeping
synced 2026-04-21 13:37:43 +00:00
21 lines
471 B
Go
21 lines
471 B
Go
package settings
|
|
|
|
// ConfigContainer contains the current setting config
|
|
type ConfigContainer struct {
|
|
current *Config
|
|
}
|
|
|
|
// Initialize a config container singleton instance
|
|
var (
|
|
Container = &ConfigContainer{}
|
|
)
|
|
|
|
// SetCurrentConfig sets the current config by a given config
|
|
func SetCurrentConfig(config *Config) {
|
|
Container.current = config
|
|
}
|
|
|
|
// GetCurrentConfig returns the current config
|
|
func (c *ConfigContainer) GetCurrentConfig() *Config {
|
|
return c.current
|
|
}
|