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

Function AddField

pkg/rpcmiddleware/rpclog/context.go:40–44  ·  view source on GitHub ↗

AddField adds a log field to the fields in the request context. Not safe for concurrent use.

(ctx context.Context, key string, value any)

Source from the content-addressed store, hash-verified

38// AddField adds a log field to the fields in the request context.
39// Not safe for concurrent use.
40func AddField(ctx context.Context, key string, value any) {
41 if v, ok := requestFieldsFromContext(ctx); ok {
42 v.fields[key] = value
43 }
44}

Callers 1

authInfoMethod · 0.92

Calls 1

requestFieldsFromContextFunction · 0.85

Tested by

no test coverage detected