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.
| 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. |
| 40 | type 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. |
| 46 | func (f *F) Get(key string) (any, bool) { |
nothing calls this directly
no outgoing calls
no test coverage detected