Fix linter warnings

This commit is contained in:
Daniel
2023-09-14 15:58:32 +02:00
parent 25ffffecf9
commit c5bca9c8a2
7 changed files with 13 additions and 6 deletions

View File

@@ -461,6 +461,7 @@ func getKind(val reflect.Value) reflect.Kind {
return NormalizeKind(kind)
}
// NormalizeKind returns a normalized kind of the given kind.
func NormalizeKind(kind reflect.Kind) reflect.Kind {
switch {
case kind >= reflect.Int && kind <= reflect.Int64:

View File

@@ -183,7 +183,7 @@ func DatetimeEncoder(loc *time.Location) EncodeFunc {
case (normalizedKind == reflect.Int || normalizedKind == reflect.Uint || normalizedKind == reflect.Float64) && colDef.IsTime:
seconds := int64(0)
switch normalizedKind {
switch normalizedKind { //nolint:exhaustive // Previous switch case assures these types.
case reflect.Int:
seconds = val.Int()
case reflect.Uint: