func describeV5(config map[string]interface{}) (map[string]interface{}, error) {
	for _, value := range config {
		vMap, ok := value.(map[string]interface{})
		if !ok {
			return nil, errors.Errorf("expected settings map got %v (%T) ", value, value)
		}
		if _, found := vMap["default"]; found {
			v, hasValue := vMap["value"]
			if hasValue {
				vMap["default"] = v
				vMap["source"] = "default"
			} else {
				delete(vMap, "default")
				vMap["source"] = "unset"
			}
		} else {
			// If default isn't set, then the source is user.
			// And we have no idea what the charm default is or whether
			// there is one.
			vMap["source"] = "user"
		}
	}
	return config, nil
}
// describeV5 will take the results of describeV4 from the apiserver
// and remove the "default" boolean, and add in "source".
// Mutates and returns the config map.
describeV5 will take the results of describeV4 from the apiserver
and remove the "default" boolean, and add in "source".
Mutates and returns the config map.
// describeV5 will take the results of describeV4 from the apiserver // and remove the " default " boolean and add in " source " . // Mutates and returns the config map .
func describeV5(config map[string]interface{}) (map[string]interface{}, error) {
	for _, value := range config {
		vMap, ok := value.(map[string]interface{})
		if !ok {
			return nil, errors.Errorf("expected settings map got %v (%T) ", value, value)
		}
		if _, found := vMap["default"]; found {
			v, hasValue := vMap["value"]
			if hasValue {
				vMap["default"] = v
				vMap["source"] = "default"
			} else {
				delete(vMap, "default")
				vMap["source"] = "unset"
			}
		} else {
			vMap["source"] = "user"
		}
	}
	return config, nil
}
func describeV5 ( config map [ string ] interface { } ) ( map [ string ] interface { } , error ) { for _ , value := range config { vMap , ok := value . ( map [ string ] interface { } ) if ! ok { return nil , errors . Errorf ( " " , value , value ) } if _ , found := vMap [ " " ] ; found { v , hasValue := vMap [ " " ] if hasValue { vMap [ " " ] = v vMap [ " " ] = " " } else { delete ( vMap , " " ) vMap [ " " ] = " " } } else { vMap [ " " ] = " " } } return config , nil }
describeV5 will take the results of describeV4 from the apiserver
and remove the "default" boolean, and add in "source".
describeV5 will take the results of describeV4 from the apiserver and remove the " default " boolean and add in " source " .
// If default isn't set, then the source is user. // And we have no idea what the charm default is or whether // there is one.