From f536a2d081f59b2b92c59bf46e2d2cbc142b2b72 Mon Sep 17 00:00:00 2001 From: awitas Date: Fri, 7 Oct 2022 09:54:43 -0700 Subject: [PATCH] updated key len --- shared/client/dictionary.go | 9 +-------- shared/field.go | 9 +-------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/shared/client/dictionary.go b/shared/client/dictionary.go index e6a884f..76b3bda 100644 --- a/shared/client/dictionary.go +++ b/shared/client/dictionary.go @@ -20,14 +20,7 @@ type Dictionary struct { } func (d *Dictionary) KeysLen() int { - count := 0 - for _, item := range d.inputs { - if item.Auxiliary { - continue - } - count++ - } - return count + return len(d.inputs) } func (d *Dictionary) inputSize() int { diff --git a/shared/field.go b/shared/field.go index 133beff..a9d5485 100644 --- a/shared/field.go +++ b/shared/field.go @@ -23,14 +23,7 @@ type ( ) func (d *MetaInput) KeysLen() int { - count := 0 - for _, item := range d.Inputs { - if item.Auxiliary { - continue - } - count++ - } - return count + return len(d.Inputs) } func (f *Field) RawType() reflect.Type {