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