MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / Fields

Method Fields

pkg/log/fields.go:76–88  ·  view source on GitHub ↗

Fields implements Fielder. Returns all fields in O(n), where n is the number of entries in the map.

()

Source from the content-addressed store, hash-verified

74
75// Fields implements Fielder. Returns all fields in O(n), where n is the number of entries in the map.
76func (f *F) Fields() map[string]any {
77 var r map[string]any
78
79 if f.parent != nil {
80 r = f.parent.Fields()
81 } else {
82 r = make(map[string]any)
83 }
84
85 maps.Copy(r, f.nodes)
86
87 return r
88}
89
90// With returns a new F that has the fields in nodes.
91func (f *F) With(nodes map[string]any) *F {

Callers

nothing calls this directly

Calls 2

FieldsMethod · 0.65
CopyMethod · 0.45

Tested by

no test coverage detected