Fix linter warnings
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user