Chore: Fix staticcheck issues (#28854)

* Chore: Fix issues reported by staticcheck

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Undo changes

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
Arve Knudsen
2020-11-05 11:57:20 +01:00
committed by GitHub
parent 9b90ff2961
commit 7897c6b7d5
24 changed files with 53 additions and 55 deletions
+2 -2
View File
@@ -15,7 +15,7 @@ import (
func validateTimeRange(item *annotations.Item) error {
if item.EpochEnd == 0 {
if item.Epoch == 0 {
return errors.New("Missing Time Range")
return errors.New("missing time range")
}
item.EpochEnd = item.Epoch
}
@@ -78,7 +78,7 @@ func (r *SqlAnnotationRepo) Update(item *annotations.Item) error {
return err
}
if !isExist {
return errors.New("Annotation not found")
return errors.New("annotation not found")
}
existing.Updated = timeNow().UnixNano() / int64(time.Millisecond)