mirror of
https://github.com/sony/sonyflake.git
synced 2025-12-23 05:05:14 +00:00
Fix ineffassign error
This commit is contained in:
@@ -57,5 +57,8 @@ func TimeDifference(server string) (time.Duration, error) {
|
||||
}
|
||||
|
||||
f, err := strconv.ParseFloat(string(submatched[1]), 64)
|
||||
if err != nil {
|
||||
return time.Duration(0), err
|
||||
}
|
||||
return time.Duration(f*1000) * time.Millisecond, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user