Browse Source

Rename Cache struct receiver name

jxyowen 7 years ago
parent
commit
e4e6aed8fb
1 changed files with 8 additions and 8 deletions
  1. 8 8
      sdk/endpoints/location_resolver.go

+ 8 - 8
sdk/endpoints/location_resolver.go

@@ -29,17 +29,17 @@ type Cache struct {
 	cache map[string]interface{}
 }
 
-func (this Cache) Get(k string) (v interface{}) {
-	this.RLock()
-	v = this.cache[k]
-	this.RUnlock()
+func (c Cache) Get(k string) (v interface{}) {
+	c.RLock()
+	v = c.cache[k]
+	c.RUnlock()
 	return
 }
 
-func (this Cache) Set(k string, v interface{}) {
-	this.Lock()
-	this.cache[k] = v
-	this.Unlock()
+func (c Cache) Set(k string, v interface{}) {
+	c.Lock()
+	c.cache[k] = v
+	c.Unlock()
 }
 
 var lastClearTimePerProduct = Cache{cache: make(map[string]interface{})}