Skip to content

Commit 9a4c204

Browse files
Merge pull request #561 from NBISweden/dependabot/go_modules/backend/github.com/mattn/go-sqlite3-1.14.15
Bump github.com/mattn/go-sqlite3 from 1.14.14 to 1.14.15 in /backend
2 parents ef6a369 + 3fcb049 commit 9a4c204

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

backend/api/handlers_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package api_test
22

33
import (
44
"encoding/json"
5-
"io/ioutil"
5+
"io"
66
"net/http"
77
"net/http/httptest"
88
"os"
@@ -158,7 +158,7 @@ func Test_Handlers(t *testing.T) {
158158
_, err = w.Write(userResponse)
159159
case "/time_entries.json":
160160
if r.Method == "POST" {
161-
bodyBytes, err := ioutil.ReadAll(r.Body)
161+
bodyBytes, err := io.ReadAll(r.Body)
162162
if err != nil {
163163
w.WriteHeader(fiber.StatusUnprocessableEntity)
164164
}

backend/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.17
55
require (
66
github.com/gofiber/fiber/v2 v2.36.0
77
github.com/gofiber/storage/sqlite3 v0.0.0-20220331080057-83339bc1564f
8-
github.com/mattn/go-sqlite3 v1.14.14
8+
github.com/mattn/go-sqlite3 v1.14.15
99
github.com/sirupsen/logrus v1.9.0
1010
github.com/swaggo/fiber-swagger v1.3.0
1111
github.com/swaggo/swag v1.8.4

backend/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJ
4949
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
5050
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
5151
github.com/mattn/go-sqlite3 v1.14.12/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
52-
github.com/mattn/go-sqlite3 v1.14.14 h1:qZgc/Rwetq+MtyE18WhzjokPD93dNqLGNT3QJuLvBGw=
53-
github.com/mattn/go-sqlite3 v1.14.14/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
52+
github.com/mattn/go-sqlite3 v1.14.15 h1:vfoHhTN1af61xCRSWzFIWzx2YskyMTwHLrExkBOjvxI=
53+
github.com/mattn/go-sqlite3 v1.14.15/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=
5454
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
5555
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
5656
github.com/otiai10/copy v1.7.0/go.mod h1:rmRl6QPdJj6EiUqXQ/4Nn2lLXoNQjFCQbbNrxgc/t3U=

backend/internal/database/database.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ package database
66
import (
77
"database/sql"
88
"fmt"
9-
"io/ioutil"
109
"os"
1110

1211
// go-sqlite3 is the module for the SQLite3 database driver.
@@ -63,11 +62,11 @@ func New(databasePath string) (*Database, error) {
6362
}
6463

6564
for i := range files {
66-
query, err := ioutil.ReadFile(files[i])
65+
query, err := os.ReadFile(files[i])
6766
if err != nil {
6867
_ = tx.Rollback()
6968
return nil,
70-
fmt.Errorf("ioutil.ReadFile() failed: %w", err)
69+
fmt.Errorf("os.ReadFile() failed: %w", err)
7170
}
7271
if _, err := tx.Exec(string(query)); err != nil {
7372
_ = tx.Rollback()

0 commit comments

Comments
 (0)