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

Struct F

pkg/log/fields.go:40–43  ·  view source on GitHub ↗

F is a Fielder that uses structural sharing to avoid copying entries. Setting a key is O(1), getting a key is O(n) (where n is the number of entries), but we only use this to accumulate fields so that's ok.

Source from the content-addressed store, hash-verified

38// Setting a key is O(1), getting a key is O(n) (where n is the number of entries),
39// but we only use this to accumulate fields so that's ok.
40type F struct {
41 parent *F
42 nodes map[string]any
43}
44
45// Get returns the key from the fields in O(n), where n is the number of entries.
46func (f *F) Get(key string) (any, bool) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected