lease: use time.Until in 'Remaining'

Fix 'gosimple' warnings.

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
release-3.3
Gyu-Ho Lee 2017-09-07 18:41:36 -07:00
parent 6e39a39e3a
commit 0e0d9e492f
1 changed files with 1 additions and 1 deletions

View File

@ -627,7 +627,7 @@ func (l *Lease) Remaining() time.Duration {
if l.expiry.IsZero() {
return time.Duration(math.MaxInt64)
}
return l.expiry.Sub(time.Now())
return time.Until(l.expiry)
}
type LeaseItem struct {