Browse Source

codec: fix lint warning - let all BasicHandle methods use same "x" as receiver name

Ugorji Nwoke 7 years ago
parent
commit
772ced7fd4
1 changed files with 3 additions and 2 deletions
  1. 3 2
      codec/helper.go

+ 3 - 2
codec/helper.go

@@ -625,15 +625,16 @@ LOOP:
 	return
 	return
 }
 }
 
 
-func (c *BasicHandle) fn(rt reflect.Type, checkFastpath, checkCodecSelfer bool) (fn *codecFn) {
+func (x *BasicHandle) fn(rt reflect.Type, checkFastpath, checkCodecSelfer bool) (fn *codecFn) {
 	rtid := rt2id(rt)
 	rtid := rt2id(rt)
-	sp := c.rtidFns.load()
+	sp := x.rtidFns.load()
 	if sp != nil {
 	if sp != nil {
 		if _, fn = findFn(sp, rtid); fn != nil {
 		if _, fn = findFn(sp, rtid); fn != nil {
 			// xdebugf("<<<< %c: found fn for %v in rtidfns of size: %v", c.n, rt, len(sp))
 			// xdebugf("<<<< %c: found fn for %v in rtidfns of size: %v", c.n, rt, len(sp))
 			return
 			return
 		}
 		}
 	}
 	}
+	c := x
 	// xdebugf("#### for %c: load fn for %v in rtidfns of size: %v", c.n, rt, len(sp))
 	// xdebugf("#### for %c: load fn for %v in rtidfns of size: %v", c.n, rt, len(sp))
 	fn = new(codecFn)
 	fn = new(codecFn)
 	fi := &(fn.i)
 	fi := &(fn.i)