Allows storagedriver parameter values to be of type interface{}

This enables use of nil, booleans, numeric types, and even complex structures for parameter values, assuming they can be parsed from yaml.
This commit is contained in:
Brian Bland 2014-12-17 19:06:55 -08:00
parent f9b119974d
commit 030b0ff310
5 changed files with 14 additions and 14 deletions

View file

@ -103,7 +103,7 @@ func (storage Storage) Parameters() Parameters {
}
// setParameter changes the parameter at the provided key to the new value
func (storage Storage) setParameter(key, value string) {
func (storage Storage) setParameter(key string, value interface{}) {
storage[storage.Type()][key] = value
}
@ -143,7 +143,7 @@ func (storage Storage) MarshalYAML() (interface{}, error) {
}
// Parameters defines a key-value parameters mapping
type Parameters map[string]string
type Parameters map[string]interface{}
// Reporting defines error reporting methods.
type Reporting struct {