Fix code consistency

This commit is contained in:
Unknwon
2016-08-11 06:48:09 -07:00
parent f4c8d0e8b3
commit 6b91d32e11
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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.
+2 -2
View File
@@ -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
}