fix?
This commit is contained in:
parent
db32d69d65
commit
fc2e385efc
1 changed files with 4 additions and 4 deletions
|
@ -360,14 +360,14 @@ type AMTEntry struct {
|
|||
}
|
||||
|
||||
// Valid reports if the entry is valid.
|
||||
func (e *AMTEntry) Valid() bool {
|
||||
return e != nil && time.Since(e.LastUpdated) < maxAMTEntryAge
|
||||
func (e AMTEntry) Valid() bool {
|
||||
return time.Since(e.LastUpdated) < maxAMTEntryAge
|
||||
}
|
||||
|
||||
// LastUpdatedAgo is a friendly string reporting how long ago the entry was
|
||||
// updated/resolved.
|
||||
func (e *AMTEntry) LastUpdatedAgo() string {
|
||||
if e == nil || e.LastUpdated.IsZero() {
|
||||
func (e AMTEntry) LastUpdatedAgo() string {
|
||||
if e.LastUpdated.IsZero() {
|
||||
return "never"
|
||||
}
|
||||
return fmt.Sprintf("%v ago", time.Since(e.LastUpdated).Truncate(time.Millisecond))
|
||||
|
|
Loading…
Reference in a new issue