Skip to content

Commit

Permalink
refactor: clean up code
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickkabwe committed May 12, 2024
1 parent a852aaf commit e9f20ba
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ type ValidatorError interface {
Error() string
}

type errorMap map[string]ValidatorError

// Validator is the interface that wraps the Validate method.
type Validator interface {
IsEmail(input string) (ok bool, err error)
Expand Down Expand Up @@ -112,7 +110,6 @@ func (v *validator) ValidateStruct(input any) errorMap {
if inputKind == reflect.Ptr {
st = st.Elem()
input = reflect.ValueOf(input).Elem().Interface()
fmt.Println(input)
}

for i := 0; i < st.NumField(); i++ {
Expand Down Expand Up @@ -163,4 +160,3 @@ func (v *validator) handleStructValidation(input []string, fieldName string, fie
}
}
}

0 comments on commit e9f20ba

Please sign in to comment.