mirror of
https://github.com/rancher/os.git
synced 2025-07-02 17:51:49 +00:00
17 lines
274 B
Go
17 lines
274 B
Go
package config
|
|
|
|
func NewConfig() *CloudConfig {
|
|
return ReadConfig(OsConfigFile)
|
|
}
|
|
|
|
func ReadConfig(file string) *CloudConfig {
|
|
if data, err := readConfig(nil, file); err == nil {
|
|
c := &CloudConfig{}
|
|
c.merge(data)
|
|
c.amendNils()
|
|
return c
|
|
} else {
|
|
return nil
|
|
}
|
|
}
|