diff --git a/cloudflarekv/cloudflarekv_test.go b/cloudflarekv/cloudflarekv_test.go index 78c77a9a..dda46df7 100644 --- a/cloudflarekv/cloudflarekv_test.go +++ b/cloudflarekv/cloudflarekv_test.go @@ -3,7 +3,6 @@ package cloudflarekv import ( "bytes" "context" - "fmt" "os" "testing" @@ -67,7 +66,6 @@ func Test_CloudflareKV_GetWithContext(t *testing.T) { cancel() val, err = testStore.GetWithContext(ctx, key) - fmt.Println(err) require.ErrorContains(t, err, context.Canceled.Error()) require.Nil(t, val) diff --git a/dynamodb/dynamodb.go b/dynamodb/dynamodb.go index 813466ae..dc522e1c 100644 --- a/dynamodb/dynamodb.go +++ b/dynamodb/dynamodb.go @@ -76,7 +76,7 @@ func New(config Config) *Storage { return store } -// GetWithContext value by key with context +// GetWithContext retrieves the value associated with the given key using the provided context. func (s *Storage) GetWithContext(ctx context.Context, key string) ([]byte, error) { k := make(map[string]types.AttributeValue) k[keyAttrName] = &types.AttributeValueMemberS{ diff --git a/minio/minio.go b/minio/minio.go index 7427979a..bbdd8b70 100644 --- a/minio/minio.go +++ b/minio/minio.go @@ -62,7 +62,7 @@ func New(config ...Config) *Storage { return storage } -// GetWithContext value by key with context +// GetWithContext retrieves the value associated with the given key using the provided context. func (s *Storage) GetWithContext(ctx context.Context, key string) ([]byte, error) { if len(key) <= 0 { return nil, errors.New("the key value is required") diff --git a/nats/nats.go b/nats/nats.go index a3b02584..8095607e 100644 --- a/nats/nats.go +++ b/nats/nats.go @@ -165,7 +165,7 @@ func New(config ...Config) *Storage { return storage } -// GetWithContext value by key with context +// GetWithContext retrieves the value associated with the given key using the provided context. func (s *Storage) GetWithContext(ctx context.Context, key string) ([]byte, error) { if len(key) <= 0 { return nil, nil diff --git a/pebble/README.md b/pebble/README.md index 69923ef2..91ceabf2 100644 --- a/pebble/README.md +++ b/pebble/README.md @@ -32,7 +32,7 @@ func (s *Storage) DeleteWithContext(ctx context.Context, key string) error func (s *Storage) Reset() error func (s *Storage) ResetWithContext(ctx context.Context) error func (s *Storage) Close() error -func (s *Storage) Conn() *badger.DB +func (s *Storage) Conn() *pebble.DB ``` **Note:** The context methods are dummy methods and don't have any functionality, as Pebble does not support context cancellation in its client library. They are provided for compliance with the Fiber storage interface. diff --git a/redis/redis.go b/redis/redis.go index 748692a4..1c50e963 100644 --- a/redis/redis.go +++ b/redis/redis.go @@ -82,7 +82,7 @@ func New(config ...Config) *Storage { } } -// GetWithContext value by key with context +// GetWithContext retrieves the value associated with the given key using the provided context. func (s *Storage) GetWithContext(ctx context.Context, key string) ([]byte, error) { if len(key) <= 0 { return nil, nil