mirror of
https://github.com/go-ini/ini.git
synced 2026-06-19 21:46:45 +02:00
Fix code consistency
This commit is contained in:
@@ -36,7 +36,7 @@ const (
|
||||
|
||||
// Maximum allowed depth when recursively substituing variable names.
|
||||
_DEPTH_VALUES = 99
|
||||
_VERSION = "1.19.1"
|
||||
_VERSION = "1.19.2"
|
||||
)
|
||||
|
||||
// Version returns current package version literal.
|
||||
|
||||
@@ -162,8 +162,8 @@ func setWithProperType(t reflect.Type, key *Key, field reflect.Value, delim stri
|
||||
// byte is an alias for uint8, so supporting uint8 breaks support for byte
|
||||
case reflect.Uint, reflect.Uint16, reflect.Uint32, reflect.Uint64:
|
||||
durationVal, err := key.Duration()
|
||||
// 0 seconds is not making sense.
|
||||
if err == nil && durationVal.Seconds() > 0 {
|
||||
// Skip zero value
|
||||
if err == nil && int(durationVal) > 0 {
|
||||
field.Set(reflect.ValueOf(durationVal))
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user