mirror of
https://github.com/sony/sonyflake.git
synced 2026-01-05 10:54:50 +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)
|
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