From 9c3bd1e879605685a76bb2142c5dfb2cb80ffeeb Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Thu, 12 Jan 2023 16:31:51 +0100 Subject: [PATCH] internal/abi_cache/cache.go: change "this" variable to "cache". --- internal/abi_cache/cache.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/internal/abi_cache/cache.go b/internal/abi_cache/cache.go index 0acef76..30e50a4 100644 --- a/internal/abi_cache/cache.go +++ b/internal/abi_cache/cache.go @@ -22,21 +22,21 @@ func New(prefix string, options *redis_cache.Options) *Cache { } } -func (this *Cache) Get(account string) (*eos.ABI, error) { +func (cache *Cache) Get(account string) (*eos.ABI, error) { var v eos.ABI - err := this.c.Get(this.ctx, this.key(account), &v) + err := cache.c.Get(cache.ctx, cache.key(account), &v) return &v, err } -func (this *Cache) Set(account string, abi *eos.ABI, ttl time.Duration) error { - return this.c.Set(&redis_cache.Item{ - Ctx: this.ctx, - Key: this.key(account), +func (cache *Cache) Set(account string, abi *eos.ABI, ttl time.Duration) error { + return cache.c.Set(&redis_cache.Item{ + Ctx: cache.ctx, + Key: cache.key(account), Value: *abi, TTL: ttl, }) } -func (this *Cache) key(account string) string { - return this.prefix + "." + account +func (cache *Cache) key(account string) string { + return cache.prefix + "." + account }