MCPcopy
hub / github.com/gofiber/fiber / SetWithContext

Method SetWithContext

shared_state_test.go:71–76  ·  shared_state_test.go::contextCheckingStorage.SetWithContext
(ctx context.Context, key string, val []byte, exp time.Duration)

Source from the content-addressed store, hash-verified

69}
70
71func (s *contextCheckingStorage) SetWithContext(ctx context.Context, key string, val []byte, exp time.Duration) error {
72 if ctx.Value(s.ctxKey) == nil {
73 return errors.New("context value not found")
74 }
75 return s.base.SetWithContext(ctx, key, val, exp)
76}
77
78func (s *contextCheckingStorage) GetWithContext(ctx context.Context, key string) ([]byte, error) {
79 if ctx.Value(s.ctxKey) == nil {

Callers 1

SetMethod · 0.95

Calls 3

ValueMethod · 0.65
NewMethod · 0.65
SetWithContextMethod · 0.65

Tested by

no test coverage detected