From ee9649ee2e7524ea9a1335bddb1c08a9335667c0 Mon Sep 17 00:00:00 2001 From: mohamed abdelrhman Date: Mon, 5 Feb 2024 21:51:30 +0200 Subject: [PATCH] ignore error check with redisClient to pass yaegi check --- plugin.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/plugin.go b/plugin.go index 4cff5d1..26a75d0 100644 --- a/plugin.go +++ b/plugin.go @@ -4,7 +4,6 @@ import ( "bytes" "context" "encoding/gob" - "fmt" "github.com/kotalco/resp" "log" "net/http" @@ -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,