From 04854855276e6f605bb6623de2302ecf6259ffa2 Mon Sep 17 00:00:00 2001 From: Jose Date: Wed, 27 Sep 2023 16:46:17 -0500 Subject: [PATCH] fix linter error --- field/binary.go | 2 +- field/composite.go | 2 +- field/hex.go | 2 +- field/numeric.go | 2 +- field/string.go | 2 +- message.go | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/field/binary.go b/field/binary.go index bccafb6..19a2a43 100644 --- a/field/binary.go +++ b/field/binary.go @@ -119,7 +119,7 @@ func (f *Binary) SetData(data interface{}) error { func (f *Binary) Unmarshal(v interface{}) error { switch val := v.(type) { case reflect.Value: - switch val.Kind() { + switch val.Kind() { //nolint:exhaustive case reflect.String: if !val.CanSet() { return fmt.Errorf("reflect.Value of the data can not be change") diff --git a/field/composite.go b/field/composite.go index 9dedbc1..212975c 100644 --- a/field/composite.go +++ b/field/composite.go @@ -195,7 +195,7 @@ func (f *Composite) Unmarshal(v interface{}) error { } dataField := dataStruct.Field(i) - switch dataField.Kind() { + switch dataField.Kind() { //nolint:exhaustive case reflect.Chan, reflect.Func, reflect.Map, reflect.Pointer, reflect.UnsafePointer, reflect.Interface, reflect.Slice: if dataField.IsNil() { dataField.Set(reflect.New(dataField.Type().Elem())) diff --git a/field/hex.go b/field/hex.go index c8bf3a6..6195617 100644 --- a/field/hex.go +++ b/field/hex.go @@ -130,7 +130,7 @@ func (f *Hex) SetData(data interface{}) error { func (f *Hex) Unmarshal(v interface{}) error { switch val := v.(type) { case reflect.Value: - switch val.Kind() { + switch val.Kind() { //nolint:exhaustive case reflect.String: if !val.CanSet() { return fmt.Errorf("reflect.Value of the data can not be change") diff --git a/field/numeric.go b/field/numeric.go index d9a4956..74d896a 100644 --- a/field/numeric.go +++ b/field/numeric.go @@ -132,7 +132,7 @@ func (f *Numeric) SetData(data interface{}) error { func (f *Numeric) Unmarshal(v interface{}) error { switch val := v.(type) { case reflect.Value: - switch val.Kind() { + switch val.Kind() { //nolint:exhaustive case reflect.String: if !val.CanSet() { return fmt.Errorf("reflect.Value of the data can not be change") diff --git a/field/string.go b/field/string.go index 7aa8bb2..60369ea 100644 --- a/field/string.go +++ b/field/string.go @@ -118,7 +118,7 @@ func (f *String) SetData(data interface{}) error { func (f *String) Unmarshal(v interface{}) error { switch val := v.(type) { case reflect.Value: - switch val.Kind() { + switch val.Kind() { //nolint:exhaustive case reflect.String: if !val.CanSet() { return fmt.Errorf("reflect.Value of the data can not be change") diff --git a/message.go b/message.go index d2d07f2..b94d520 100644 --- a/message.go +++ b/message.go @@ -502,7 +502,7 @@ func (m *Message) Unmarshal(v interface{}) error { } dataField := dataStruct.Field(i) - switch dataField.Kind() { + switch dataField.Kind() { //nolint:exhaustive case reflect.Chan, reflect.Func, reflect.Map, reflect.Pointer, reflect.UnsafePointer, reflect.Interface, reflect.Slice: if dataField.IsNil() { dataField.Set(reflect.New(dataField.Type().Elem()))