ValueLoader takes a slice of values, whereas ValueSaver produces a map[string]Value. This difference reflects what the underlying API produces/consumes.
For users that just want to deal with a slice of values and not worry about maps, we have ValuesSaver which can convert a slice of values to a map[string]Value, with the aid of a Schema.
It might be nice to similarly provide another adapter that implements ValueLoader, but stores the data in a map, so something like:
type MapLoader map[string]Value
func (ml MapLoader) Load(v []Value, s Schema) error {
// TODO
}
ValueLoader takes a slice of values, whereas ValueSaver produces a map[string]Value. This difference reflects what the underlying API produces/consumes.
For users that just want to deal with a slice of values and not worry about maps, we have ValuesSaver which can convert a slice of values to a map[string]Value, with the aid of a Schema.
It might be nice to similarly provide another adapter that implements ValueLoader, but stores the data in a map, so something like: