From 3629827a32bbb36ed21ba24d3feed7947dd1fd77 Mon Sep 17 00:00:00 2001 From: "shuai.qi" Date: Sat, 2 Dec 2023 13:38:17 +0800 Subject: [PATCH 1/3] chore: remove unnecessary statement --- cache.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/cache.go b/cache.go index 0f4fa6b5c..4bfb11443 100644 --- a/cache.go +++ b/cache.go @@ -218,8 +218,6 @@ func (v *Validate) parseFieldTagsRecursive(tag string, fieldName string, alias s panic(fmt.Sprintf("'%s' tag must be immediately preceded by the '%s' tag", keysTag, diveTag)) } - current.typeof = typeKeys - // need to pass along only keys tag // need to increment i to skip over the keys tags b := make([]byte, 0, 64) From 7bdbfa148f0a9abeedc60c433af3778dace35e2f Mon Sep 17 00:00:00 2001 From: "shuai.qi" Date: Sat, 2 Dec 2023 14:02:11 +0800 Subject: [PATCH 2/3] chore: unnecessary statement continue in loop control --- cache.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/cache.go b/cache.go index 4bfb11443..609f69644 100644 --- a/cache.go +++ b/cache.go @@ -209,7 +209,6 @@ func (v *Validate) parseFieldTagsRecursive(tag string, fieldName string, alias s switch t { case diveTag: current.typeof = typeDive - continue case keysTag: current.typeof = typeKeys @@ -235,7 +234,6 @@ func (v *Validate) parseFieldTagsRecursive(tag string, fieldName string, alias s } current.keys, _ = v.parseFieldTagsRecursive(string(b[:len(b)-1]), fieldName, "", false) - continue case endKeysTag: current.typeof = typeEndKeys @@ -249,19 +247,15 @@ func (v *Validate) parseFieldTagsRecursive(tag string, fieldName string, alias s case omitempty: current.typeof = typeOmitEmpty - continue case omitnil: current.typeof = typeOmitNil - continue case structOnlyTag: current.typeof = typeStructOnly - continue case noStructLevelTag: current.typeof = typeNoStructLevel - continue default: if t == isdefault { From adc066a72c2073ad0a5bd0e3110f50a8c8e9aea0 Mon Sep 17 00:00:00 2001 From: nodivbyzero Date: Fri, 4 Apr 2025 15:29:59 -0700 Subject: [PATCH 3/3] Trigger Build