Skip to content

Commit

Permalink
fix: remove debug printf
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdecaf committed Oct 17, 2023
1 parent e7d009b commit 8a7fbd3
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions pkg/utils/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ package utils

import (
"errors"
"fmt"
"reflect"
)

Expand All @@ -17,7 +16,6 @@ var (
ErrFailedCreateTaxReturn = errors.New("failed to create tax return")
// ErrEmptyXML is given when hasn't xml document
ErrEmptyXML = errors.New("hasn't xml document")
debug = false
)

var (
Expand Down Expand Up @@ -69,15 +67,11 @@ func validateCallbackByValue(data reflect.Value) error {
// to validate interface
func Validate(r interface{}) error {
var err error
if debug {
fmt.Println(reflect.ValueOf(r).Type())
}

fields := reflect.ValueOf(r).Elem()
for i := 0; i < fields.NumField(); i++ {
fieldData := fields.Field(i)
if debug {
fmt.Println(fields.Type().Field(i).Name)
}

kind := fieldData.Kind()
if kind == reflect.Slice {
for i := 0; i < fieldData.Len(); i++ {
Expand Down

0 comments on commit 8a7fbd3

Please sign in to comment.