MCPcopy
hub / github.com/larksuite/cli / ContextWithShortcut

Function ContextWithShortcut

internal/cmdutil/secheader.go:191–195  ·  view source on GitHub ↗

ContextWithShortcut injects shortcut name and execution ID into the context.

(ctx context.Context, name, executionId string)

Source from the content-addressed store, hash-verified

189
190// ContextWithShortcut injects shortcut name and execution ID into the context.
191func ContextWithShortcut(ctx context.Context, name, executionId string) context.Context {
192 ctx = context.WithValue(ctx, ctxShortcutName, name)
193 ctx = context.WithValue(ctx, ctxExecutionId, executionId)
194 return ctx
195}
196
197// ShortcutNameFromContext extracts the shortcut name from the context.
198func ShortcutNameFromContext(ctx context.Context) (string, bool) {

Calls

no outgoing calls