Remove unused second part of the expiry counter
This commit is contained in:
@@ -169,10 +169,16 @@ func describeExpiry(t *time.Time, now time.Time) string {
|
||||
if t == nil {
|
||||
return "never"
|
||||
}
|
||||
at := t.UTC().Format("2006-01-02 15:04 MST")
|
||||
d := t.Sub(now).Round(time.Minute)
|
||||
if d < 0 {
|
||||
switch {
|
||||
case d < 0:
|
||||
return "expired"
|
||||
case d == 0:
|
||||
// Rounded away to nothing, and a zero duration is how this program
|
||||
// spells "unlimited": saying "in never" of a file about to go would
|
||||
// be exactly backwards.
|
||||
return at + " (in under a minute)"
|
||||
}
|
||||
return fmt.Sprintf("%s (in %s)", t.UTC().Format("2006-01-02 15:04 MST"),
|
||||
config.FormatDuration(d))
|
||||
return fmt.Sprintf("%s (in %s)", at, config.FormatDuration(d))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user