Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MergeError ¶ added in v0.2.0
func MergeError(err error, item ItemInterface) error
MergeError is for when a required attribute is empty
Types ¶
type ItemInterface ¶ added in v0.2.0
ItemInterface is the interface for a config map, providing the methods needed to sort a set of configs, as well as for extracting the BodyMap (for merging, later)
type Map ¶ added in v0.2.0
type Map struct {
// contains filtered or unexported fields
}
Map is the type of config list. This is a list of sort-keys associated to a config item (i.e. ItemInterface)
func (*Map) AddItem ¶ added in v0.2.0
func (s *Map) AddItem(item ...ItemInterface) *Map
AddItem is for adding another item to the config list.
func (*Map) Items ¶ added in v0.2.0
func (s *Map) Items() []ItemInterface
Items returns a copy of the current config items.
func (*Map) Merge ¶ added in v0.2.0
Merge all the BodyMap's provided into a single BodyMap, return a new BodyMap.
They are combined by first lexically-ordering all the configs with the Sorted() method, then merging thme together in lexical-order -- whereby the later keys in a BodyMap will override earlier ones.
i.e. a BodyMap with a Key() of "z..." will be merged-in after those with a Key() of "a..."