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:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user