MCPcopy Index your code
hub / github.com/coder/coder / ActorIDFromContext

Function ActorIDFromContext

aibridge/context/context.go:33–38  ·  view source on GitHub ↗

ActorIDFromContext safely extracts the actor ID from the context. Returns an empty string if no actor is found.

(ctx context.Context)

Source from the content-addressed store, hash-verified

31// ActorIDFromContext safely extracts the actor ID from the context.
32// Returns an empty string if no actor is found.
33func ActorIDFromContext(ctx context.Context) string {
34 if actor := ActorFromContext(ctx); actor != nil {
35 return actor.ID
36 }
37 return ""
38}

Callers

nothing calls this directly

Calls 1

ActorFromContextFunction · 0.70

Tested by

no test coverage detected