MCPcopy Create free account
hub / github.com/belak/gitdir / CtxPublicKey

Function CtxPublicKey

context.go:91–97  ·  view source on GitHub ↗

CtxPublicKey pulls the public key out of the context, or nil if not found.

(ctx context.Context)

Source from the content-addressed store, hash-verified

89
90// CtxPublicKey pulls the public key out of the context, or nil if not found.
91func CtxPublicKey(ctx context.Context) *models.PublicKey {
92 if pk, ok := ctx.Value(contextKeyPublicKey).(*models.PublicKey); ok {
93 return pk
94 }
95
96 return nil
97}

Callers 2

TestCtxPublicKeyFunction · 0.85
cmdRepoActionMethod · 0.85

Calls

no outgoing calls

Tested by 1

TestCtxPublicKeyFunction · 0.68