Skip to content

Commit

Permalink
Merge a3afed9 into 54f9383
Browse files Browse the repository at this point in the history
  • Loading branch information
BinamB committed Nov 30, 2021
2 parents 54f9383 + a3afed9 commit 661378e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ on:
branches:
- master
- main
- v*
pull_request:
permissions:
contents: read
pull-requests: read
jobs:
golangci:
name: lint
Expand All @@ -17,7 +21,7 @@ jobs:
uses: golangci/golangci-lint-action@v2
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.29
version: v1.43.0

# Optional: working directory, useful for monorepos
# working-directory: somedir
Expand All @@ -26,7 +30,7 @@ jobs:
# args: --issues-exit-code=0 --timeout=5m

# Optional: show only new issues if it's a pull request. The default value is `false`.
only-new-issues: true
# only-new-issues: true

# Optional: if set to true then the action will use pre-installed Go.
# skip-go-installation: true
Expand Down
4 changes: 0 additions & 4 deletions arborist/response.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ import (
"net/http"
)

type responseJSON interface {
write(w http.ResponseWriter, r *http.Request) error
}

type jsonResponse struct {
content interface{}
code int
Expand Down
5 changes: 4 additions & 1 deletion arborist/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,10 +319,13 @@ func TestServer(t *testing.T) {

getTagForResource := func(path string) string {
var tags []string
db.Select(&tags, "SELECT tag FROM resource WHERE path = $1", arborist.FormatPathForDb(path))
err := db.Select(&tags, "SELECT tag FROM resource WHERE path = $1", arborist.FormatPathForDb(path))
if len(tags) == 0 {
return ""
}
if err != nil {
return err
}
return tags[0]
}

Expand Down
2 changes: 1 addition & 1 deletion arborist/sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func transactify(db *sqlx.DB, call func(tx *sqlx.Tx) *ErrorResponse) *ErrorRespo
errResponse := call(tx)
if errResponse != nil {
errResponse.log.Info("rolling back transaction")
tx.Rollback()
_ = tx.Rollback()
return errResponse
}
err = tx.Commit()
Expand Down

0 comments on commit 661378e

Please sign in to comment.