Skip to content

Commit

Permalink
fix lint and bump go.mod
Browse files Browse the repository at this point in the history
  • Loading branch information
mfridman committed May 18, 2023
1 parent e4f61d3 commit b02161e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

strategy:
matrix:
go-version: ["1.19", "1.20"]
go-version: ["1.20"]
os: [ubuntu-latest]

runs-on: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/pressly/goose/v4

go 1.19
go 1.20

require (
github.com/ClickHouse/clickhouse-go/v2 v2.9.0
Expand Down
14 changes: 6 additions & 8 deletions goose_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
"strings"
"sync"
"testing"
"time"

_ "github.com/jackc/pgx/v5/stdlib"
_ "modernc.org/sqlite"
Expand Down Expand Up @@ -302,14 +301,14 @@ func newDBString(t *testing.T) string {
return fmt.Sprintf("sqlite:%s", filepath.Join(dir, name))
}

const alphanum = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"

func randName(n int) string {
const alphanum = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
bytes := make([]byte, n)
rand.Read(bytes)
for i, b := range bytes {
bytes[i] = alphanum[b%byte(len(alphanum))]
b := make([]byte, n)
for i := range b {
b[i] = alphanum[rand.Intn(len(alphanum))]
}
return string(bytes)
return string(b)
}

func countSQLFiles(t *testing.T, dir string) int {
Expand Down Expand Up @@ -347,7 +346,6 @@ func copyFile(t *testing.T, src, dest string) {
}

func randomPort() int {
rand.Seed(time.Now().UnixNano())
min, max := 32768, 61000
// Generate a random number within the range [min, max]
return rand.Intn(max-min+1) + min
Expand Down

0 comments on commit b02161e

Please sign in to comment.