From 8a7fbd3f33cd2a9ca9088b7812a19c02a8db1735 Mon Sep 17 00:00:00 2001 From: Adam Shannon Date: Tue, 17 Oct 2023 08:29:35 -0500 Subject: [PATCH] fix: remove debug printf --- pkg/utils/errors.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/pkg/utils/errors.go b/pkg/utils/errors.go index c227b68a..ff9e5cdd 100644 --- a/pkg/utils/errors.go +++ b/pkg/utils/errors.go @@ -6,7 +6,6 @@ package utils import ( "errors" - "fmt" "reflect" ) @@ -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 ( @@ -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++ {