Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecuteBuffered ¶
Types ¶
type StringMapBuilder ¶
type StringMapBuilder struct {
// contains filtered or unexported fields
}
StringMapBuilder supports use cases where a given template string will be expanded multiple times with different sets of key/value pairs, and the data map is composed from combinations of map[string]string and struct values which are convertible to the former.
An empty string value will be remain empty if its key is registered by SetExpectedKey. If the key "K" is not expected, the value will be replaced by "{{.K}}" to allow a later expansion to provide a value.
func NewStringMapBuilder ¶
func NewStringMapBuilder() *StringMapBuilder
func (*StringMapBuilder) Map ¶
func (d *StringMapBuilder) Map() map[string]string
Map returns the currently built key/value map.
func (*StringMapBuilder) Merge ¶
func (d *StringMapBuilder) Merge(mode cage_structs.MergeMode, maps ...interface{}) *StringMapBuilder
Merge augments the key/value map with one or more map[string]map values.
func (*StringMapBuilder) SetExpectedKey ¶
func (d *StringMapBuilder) SetExpectedKey(k ...string) *StringMapBuilder
SetExpectedKey configures the builder to replace the input keys in Map instead of retaining them as placeholders for a future expanasion when they are expected.