From a57bc23adf7b591c06234a81d01cf2d3ed26bf19 Mon Sep 17 00:00:00 2001 From: Masaaki Goshima Date: Tue, 9 Feb 2021 22:24:53 +0900 Subject: [PATCH] Fix error by linter --- codec.go | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/codec.go b/codec.go index 67cc9c3..96b917a 100644 --- a/codec.go +++ b/codec.go @@ -12,14 +12,12 @@ const ( ) var ( - cachedOpcodeSets []*opcodeSet - cachedOpcodeMap unsafe.Pointer // map[uintptr]*opcodeSet - existsCachedOpcodeSets bool - cachedDecoder []decoder - cachedDecoderMap unsafe.Pointer // map[uintptr]decoder - existsCachedDecoder bool - baseTypeAddr uintptr - maxTypeAddr uintptr + cachedOpcodeSets []*opcodeSet + cachedOpcodeMap unsafe.Pointer // map[uintptr]*opcodeSet + cachedDecoder []decoder + cachedDecoderMap unsafe.Pointer // map[uintptr]decoder + baseTypeAddr uintptr + maxTypeAddr uintptr ) //go:linkname typelinks reflect.typelinks @@ -69,7 +67,6 @@ func setupCodec() error { return fmt.Errorf("too big address range %d", addrRange) } cachedOpcodeSets = make([]*opcodeSet, addrRange) - existsCachedOpcodeSets = true cachedDecoder = make([]decoder, addrRange) baseTypeAddr = min maxTypeAddr = max