Skip to content

Commit

Permalink
linter fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Volkov-Stanislav committed Jun 29, 2023
1 parent f7dc3e3 commit 08e21ab
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 16 deletions.
3 changes: 1 addition & 2 deletions stats/stats.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package stats

import (
"fmt"
"net/http"

"github.com/prometheus/client_golang/prometheus"
Expand Down Expand Up @@ -73,7 +72,7 @@ func (o *Instance) serve() error {
}

func (o *Instance) getStats(w http.ResponseWriter, r *http.Request) {
w.Write([]byte(fmt.Sprint("Data Post Silence;Silence StartsAt;Silence EndsAt;Silence Comment;Silence Matchers\n")))
w.Write([]byte("Data Post Silence;Silence StartsAt;Silence EndsAt;Silence Comment;Silence Matchers\n"))
// first print old stats (after o.shedCountIndex)
for _, stat := range o.stat[o.statsCountIndex:] {
if stat == "" {
Expand Down
12 changes: 5 additions & 7 deletions storages/csvstorage.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,14 +212,12 @@ func (o *CSVstorage) run(add chan models.SheduleSection, del chan string) {
defer tim.Stop()

for {
select {
case t := <-tim.C:
o.logger.Sugar().Infof("Tick on %v", t)
t := <-tim.C
o.logger.Sugar().Infof("Tick on %v", t)

err := o.update(add, del)
if err != nil {
return
}
err := o.update(add, del)
if err != nil {
return
}
}
}
Expand Down
12 changes: 5 additions & 7 deletions storages/yamlstorage.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,12 @@ func (o *YAMLstorage) run(add chan models.SheduleSection, del chan string) {
defer tim.Stop()

for {
select {
case t := <-tim.C:
o.logger.Sugar().Infof("Tick on %v", t)
t := <-tim.C
o.logger.Sugar().Infof("Tick on %v", t)

err := o.update(add, del)
if err != nil {
return
}
err := o.update(add, del)
if err != nil {
return
}
}
}
Expand Down

0 comments on commit 08e21ab

Please sign in to comment.