1
0
mirror of https://github.com/rancher/os.git synced 2025-07-05 02:56:13 +00:00
os/config/default.go

17 lines
274 B
Go
Raw Normal View History

2015-02-17 05:08:48 +00:00
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
2015-02-17 05:08:48 +00:00
}
}