MCPcopy Create free account
hub / github.com/PaperDebugger/paperdebugger / Set

Function Set

internal/libs/contextutil/contextutil.go:26–32  ·  view source on GitHub ↗
(ctx context.Context, k string, v T)

Source from the content-addressed store, hash-verified

24}
25
26func Set[T any](ctx context.Context, k string, v T) context.Context {
27 if gc, ok := ctx.(*gin.Context); ok {
28 gc.Set(k, v)
29 return ctx
30 }
31 return context.WithValue(ctx, contextKey(k), v)
32}
33
34func SetActor(ctx context.Context, actor *accesscontrol.Actor) context.Context {
35 return Set(ctx, actorKey, actor)

Callers 3

SetActorFunction · 0.85
SetProjectIDFunction · 0.85
SetConversationIDFunction · 0.85

Calls 1

contextKeyTypeAlias · 0.85

Tested by

no test coverage detected