Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Expand ¶
Expand substitutes the values-Providers in the map by the key-value pairs returned by the value's GetLoganFields() implementation.
Expand doesn't modify provided map anyhow - just returns a new (expanded) one.
func Merge ¶
Merge merges two instances of `map[string]interface{}`. You can pass here as arguments any types, which are in fact `map[string]interface{}`.
If both maps has some key - the value from the `f2` will be used.
Merge does not modify any of the map - it produces a new map.
Types ¶
type Provider ¶
type Provider interface {
GetLoganFields() map[string]interface{}
}
Provider if passed as a field value (see `logan.Entity.WithField()` and `errors.F.Add()`), will be transformed into map with multiple key-values: each key provided in the return map of implementation of `GetLoganFields()` will be prefixed with the key of the whole entity, using `_` delimiter. See example in tests.