Documentation ¶
Index ¶
- func AddAll[K comparable, V any](toMap map[K]V, fromMap map[K]V)
- func Count[K comparable, V any](target map[K]V) (cnt int)
- func Get[K comparable, V any](key K, target map[K]V) V
- func GetString(key string, target map[string]any) string
- func HasKey[K comparable, V any](key K, target map[K]V) bool
- func LoadPropertiesMapYamlToMap(filename, path string, properties *Properties)
- func Merge[K comparable, V any](baseMap map[K]V, overridingMap map[K]V) map[K]V
- func Print[K comparable, V any](target map[K]V, msg string, args ...any)
- func PrintPadded[K comparable, V any](target map[K]V, depth int, msg string, args ...any)
- type OverridableProperties
- type Properties
- type PropertyManager
- func (p *PropertyManager) Add(path string, props *OverridableProperties)
- func (p *PropertyManager) Get(path string) *OverridableProperties
- func (p *PropertyManager) GetFirstSetWithSuffix(suffix string) *OverridableProperties
- func (p *PropertyManager) GetSetsWithSuffix(suffix string) (found []*OverridableProperties)
- func (p *PropertyManager) Has(path string) bool
- func (p *PropertyManager) SetCount() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddAll ¶
func AddAll[K comparable, V any](toMap map[K]V, fromMap map[K]V)
func Count ¶
func Count[K comparable, V any](target map[K]V) (cnt int)
func Get ¶
func Get[K comparable, V any](key K, target map[K]V) V
func HasKey ¶
func HasKey[K comparable, V any](key K, target map[K]V) bool
func LoadPropertiesMapYamlToMap ¶
func LoadPropertiesMapYamlToMap(filename, path string, properties *Properties)
func Merge ¶
func Merge[K comparable, V any](baseMap map[K]V, overridingMap map[K]V) map[K]V
func PrintPadded ¶
func PrintPadded[K comparable, V any](target map[K]V, depth int, msg string, args ...any)
Types ¶
type OverridableProperties ¶
type OverridableProperties struct { FileName string KeyPath string Path string Contents Properties Children []*OverridableProperties Parent *OverridableProperties }
func NewOverridableProperties ¶
func NewOverridableProperties(filename string, path string) *OverridableProperties
func NewOverriddenProperties ¶
func NewOverriddenProperties(properties *OverridableProperties) *OverridableProperties
func (*OverridableProperties) Add ¶
func (c *OverridableProperties) Add(child *OverridableProperties)
Build Relationships
func (*OverridableProperties) GetGrandestParent ¶
func (c *OverridableProperties) GetGrandestParent() *OverridableProperties
func (*OverridableProperties) GetKeyPath ¶
func (c *OverridableProperties) GetKeyPath() string
func (*OverridableProperties) GetOverriddenProperties ¶
func (c *OverridableProperties) GetOverriddenProperties() Properties
type Properties ¶
type PropertyManager ¶
type PropertyManager struct {
// contains filtered or unexported fields
}
func NewPropertyManager ¶
func NewPropertyManager() *PropertyManager
func (*PropertyManager) Add ¶
func (p *PropertyManager) Add(path string, props *OverridableProperties)
func (*PropertyManager) Get ¶
func (p *PropertyManager) Get(path string) *OverridableProperties
func (*PropertyManager) GetFirstSetWithSuffix ¶
func (p *PropertyManager) GetFirstSetWithSuffix(suffix string) *OverridableProperties
func (*PropertyManager) GetSetsWithSuffix ¶
func (p *PropertyManager) GetSetsWithSuffix(suffix string) (found []*OverridableProperties)
func (*PropertyManager) Has ¶
func (p *PropertyManager) Has(path string) bool
func (*PropertyManager) SetCount ¶
func (p *PropertyManager) SetCount() int
Click to show internal directories.
Click to hide internal directories.