Documentation ¶
Index ¶
- func DebugSetType(pm Map, name string)
- func Delete(pm Map, key string)
- func Empty(pm Map) bool
- func ForEach(pm Map, f func(k, v string) error) error
- func Set[V any](pm Map, key string, value V)
- func SetDefault[V any](pm Map, key string, value V)
- func StringOr(pm Map, key string, def string) string
- func Value[V any](pm Map, key string, def V) (V, error)
- func ValueOr[V any](pm Map, key string, def V) (V, error)
- func ValueOrP[V any](pm Map, key string, def V, errp *error) V
- func ValueP[V any](pm Map, key string, def V, errp *error) V
- type Map
- type TriState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DebugSetType ¶
DebugSetType enables logging for the given map and annotates logs with the given name.
func SetDefault ¶
SetDefault sets a properties map entry if not already set.
func StringOr ¶
StringOr returns the string value, or the given value if not found.
This is separate as this special case cannot ever fail.
Types ¶
type Map ¶
type Map struct {
// contains filtered or unexported fields
}
Map is a helper to easier deal with maps.
func (Map) MarshalJSON ¶
func (*Map) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.