MCPcopy Create free account
hub / github.com/bytebase/bytebase / attrsFromContext

Function attrsFromContext

backend/common/log/context.go:33–42  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

31}
32
33func attrsFromContext(ctx context.Context) []slog.Attr {
34 if ctx == nil {
35 return nil
36 }
37 attrs, ok := ctx.Value(contextAttrsKey{}).([]slog.Attr)
38 if !ok {
39 return nil
40 }
41 return attrs
42}
43
44type contextHandler struct {
45 handler slog.Handler

Callers 2

WithAttrsFunction · 0.85
HandleMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected