1
0
mirror of https://github.com/rancher/os.git synced 2025-09-09 02:31:36 +00:00

ros config get shows default values

This commit is contained in:
Josh Curl
2016-03-31 21:31:46 -07:00
parent ecae451ad1
commit c0c8179813
12 changed files with 103 additions and 18 deletions

View File

@@ -140,6 +140,16 @@ func (c *CloudConfig) Get(key string) (interface{}, error) {
return v, nil
}
func (c *CloudConfig) GetIgnoreOmitEmpty(key string) (interface{}, error) {
data := map[interface{}]interface{}{}
if err := util.ConvertIgnoreOmitEmpty(c, &data); err != nil {
return nil, err
}
v, _ := getOrSetVal(key, data, nil)
return v, nil
}
func (c *CloudConfig) Set(key string, value interface{}) (*CloudConfig, error) {
data := map[interface{}]interface{}{}
if err := util.Convert(c, &data); err != nil {