mirror of
https://github.com/sony/sonyflake.git
synced 2026-11-15 23:36:30 +00:00
Fix ineffassign error
This commit is contained in:
1 parent
04f6255e27
commit
24db3dfba6
1 file changed
+3
@@ -57,5 +57,8 @@ func TimeDifference(server string) (time.Duration, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
f, err := strconv.ParseFloat(string(submatched[1]), 64)
|
f, err := strconv.ParseFloat(string(submatched[1]), 64)
|
||||||
|
if err != nil {
|
||||||
|
return time.Duration(0), err
|
||||||
|
}
|
||||||
return time.Duration(f*1000) * time.Millisecond, nil
|
return time.Duration(f*1000) * time.Millisecond, nil
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user