Skip to content

Commit

Permalink
fix(runner): return empty array instead of null for boltdb
Browse files Browse the repository at this point in the history
  • Loading branch information
fiftin committed Nov 22, 2024
1 parent 8e525e7 commit e43af6b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions db/bolt/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@ import (
)

func (d *BoltDb) GetRunner(projectID int, runnerID int) (runner db.Runner, err error) {
err = db.ErrNotFound
return
}

func (d *BoltDb) GetRunners(projectID int, activeOnly bool) (runners []db.Runner, err error) {
runners = make([]db.Runner, 0)
return
}

func (d *BoltDb) DeleteRunner(projectID int, runnerID int) (err error) {
err = db.ErrNotFound
return
}
2 changes: 2 additions & 0 deletions db/sql/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
)

func (d *SqlDb) GetRunner(projectID int, runnerID int) (runner db.Runner, err error) {
err = db.ErrNotFound
return
}

Expand All @@ -16,5 +17,6 @@ func (d *SqlDb) GetRunners(projectID int, activeOnly bool) (runners []db.Runner,
}

func (d *SqlDb) DeleteRunner(projectID int, runnerID int) (err error) {
err = db.ErrNotFound
return
}

0 comments on commit e43af6b

Please sign in to comment.