Skip to content

Commit

Permalink
ignore error check with redisClient to pass yaegi check
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamed-abdelrhman committed Feb 5, 2024
1 parent fdb7881 commit ee9649e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"bytes"
"context"
"encoding/gob"
"fmt"
"github.com/kotalco/resp"
"log"
"net/http"
Expand Down Expand Up @@ -52,10 +51,8 @@ func New(ctx context.Context, next http.Handler, config *Config, name string) (h
}
gob.Register(CachedResponse{})

respClient, err := resp.NewRedisClient(config.RedisAddress, config.RedisPoolSize, config.RedisAuth)
if err != nil {
return nil, fmt.Errorf("can't create redis client")
}
//ignore error check to run the plugin with Yaegi
respClient, _ := resp.NewRedisClient(config.RedisAddress, config.RedisPoolSize, config.RedisAuth)

handler := &Cache{
next: next,
Expand Down

0 comments on commit ee9649e

Please sign in to comment.