Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove unnecessary statement #1200

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 0 additions & 8 deletions cache.go
Expand Up @@ -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
Expand All @@ -218,8 +217,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)
Expand All @@ -237,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
Expand All @@ -251,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 {
Expand Down