Hi @rueian
Currently facing mock issue in my repo for mocking the Cache() method. The Cache() method returns a concrete type of CachaCompat.
cacheCompat := mocks.NewCacheCompat(t)
stringCmd := &rueidiscompat.StringCmd{}
stringCmd.SetErr(rueidiscompat.Nil)
RedisClient.On("Cache", 100*time.Millisecond).Return(cacheCompat)
cacheCompat.On("Get", ctx, "key").Return(stringCmd)
Also creating an interface at my end does not work as mockery fails it with incorrect type.
panic: interface conversion: interface {} is *mocks.CacheCompat, not rueidiscompat.CacheCompat [recovered, repanicked]
Only solution which I see is to return the CacheCompat as an interface, what do you suggest?