pull/10/head
Hunter Long 2018-06-29 20:48:55 -07:00
parent 3866da7aad
commit 81bcdb2f98
1 changed files with 5 additions and 1 deletions

View File

@ -108,7 +108,11 @@ func (s *Service) SmallText() string {
last := s.LimitedFailures()
hits, _ := s.LimitedHits()
if !s.Online {
return fmt.Sprintf("%v at %v", last[0].ParseError(), last[0].CreatedAt.Format("Monday 3:04PM, Jan _2 2006"))
if len(last) > 0 {
return fmt.Sprintf("%v at %v", last[0].ParseError(), last[0].CreatedAt.Format("Monday 3:04PM, Jan _2 2006"))
} else {
return fmt.Sprintf("%v is currently offline", s.Name)
}
} else {
if len(last) == 0 {
return fmt.Sprintf("Online since %v", s.CreatedAt.Format("Monday 3:04PM, Jan _2 2006"))