mirror of
https://github.com/rancher/os.git
synced 2025-07-13 22:54:03 +00:00
16 lines
243 B
Go
16 lines
243 B
Go
package config
|
|
|
|
func NewConfig() *Config {
|
|
return ReadConfig(OsConfigFile)
|
|
}
|
|
|
|
func ReadConfig(file string) *Config {
|
|
if data, err := readConfig(nil, file); err == nil {
|
|
c := &Config{}
|
|
c.merge(data)
|
|
return c
|
|
} else {
|
|
return nil
|
|
}
|
|
}
|