Skip to content

Commit

Permalink
fix database reassignment
Browse files Browse the repository at this point in the history
  • Loading branch information
stefnedelchevbrady committed Sep 13, 2022
1 parent 528d4ba commit 1db442c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ jobs:
- name: Verify builds with xk6
run: |
go install go.k6.io/xk6/cmd/xk6@latest
CGO_ENABLED=1
xk6 build --with ${{ steps.module-name.outputs.Module }}=.
CGO_ENABLED=1 xk6 build --with ${{ steps.module-name.outputs.Module }}=.
run-unit-tests:
runs-on: ubuntu-latest
Expand Down
7 changes: 3 additions & 4 deletions sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,11 @@ func (*SQL) Open(database string, connectionString string) (*dbsql.DB, error) {
return nil, fmt.Errorf("database %s is not supported", database)
}

dbType := database
if dbType == "oracle" {
dbType := "godror"
if database == "oracle" {
database = "godror"
}

db, err := dbsql.Open(dbType, connectionString)
db, err := dbsql.Open(database, connectionString)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 1db442c

Please sign in to comment.