1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

Minor code cleanup.

This commit is contained in:
Ferdinand Mütsch
2019-11-07 23:11:19 +01:00
parent 121b8c9885
commit fe1cc3ac88
7 changed files with 21 additions and 21 deletions

View File

@ -36,7 +36,7 @@ func (srv *AliasService) GetAliasOrDefault(userId string, summaryType uint8, val
}
return value, nil
}
return "", errors.New("User aliases not initialized")
return "", errors.New("user aliases not initialized")
}
func (src *AliasService) IsInitialized(userId string) bool {

View File

@ -188,7 +188,7 @@ func (srv *SummaryService) aggregateBy(heartbeats []*models.Heartbeat, summaryTy
func getMissingIntervals(from, to time.Time, existingSummaries []*models.Summary) []*Interval {
if len(existingSummaries) == 0 {
return []*Interval{&Interval{from, to}}
return []*Interval{{from, to}}
}
intervals := make([]*Interval, 0)