Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/epmon
epmon.db*
config.yaml
config.json
data/
4 changes: 2 additions & 2 deletions internal/prober/prober_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func svc(url string) config.Service {

func TestProbeUp(t *testing.T) {
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
w.Write([]byte("hello world"))
_, _ = w.Write([]byte("hello world"))
}))
defer srv.Close()

Expand All @@ -47,7 +47,7 @@ func TestProbeUp(t *testing.T) {
func TestProbeDownCases(t *testing.T) {
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if r.URL.Path == "/missing-body" {
w.Write([]byte("nope"))
_, _ = w.Write([]byte("nope"))
return
}
w.WriteHeader(500)
Expand Down
5 changes: 2 additions & 3 deletions internal/scheduler/scheduler_threshold_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ type thresholdObservation struct {

// thresholdObserver captures every ObserveProbe call in order.
type thresholdObserver struct {
mu sync.Mutex
obs []thresholdObservation
seen int
mu sync.Mutex
obs []thresholdObservation
}

func (o *thresholdObserver) ObserveCheck(string, bool, int64) {}
Expand Down
2 changes: 1 addition & 1 deletion internal/store/sqlite/sqlite.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func (s *Store) SyncServices(ctx context.Context, services []store.ServiceMeta,
if err != nil {
return err
}
defer tx.Rollback()
defer func() { _ = tx.Rollback() }()
for _, svc := range services {
if _, err := tx.ExecContext(ctx,
`INSERT INTO services(id, name, url, updated_at) VALUES(?,?,?,?)
Expand Down
Loading