Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- main

env:
GOLANGCI_LINT_VERSION: v2.9.0
GOLANGCI_LINT_VERSION: v2.13.2

permissions:
contents: read
Expand All @@ -19,7 +19,7 @@ jobs:
name: Test
strategy:
matrix:
version: ["1.24", "1.25", "1.26"]
version: ["1.25", "1.26", "1.27"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand Down
2 changes: 0 additions & 2 deletions base32/base32.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,6 @@ func DecodeLower(s string) ([]byte, error) {
// ensure the table is valid.
//
// Direct usage is discouraged. Use DecodeUpper or DecodeLower instead.
//
//nolint:gosec // G602 false positive: s length is validated and all indexes are fixed in this unrolled decoder.
func Decode(s string, idxTable [256]byte) ([]byte, error) {
if len(s) != 26 {
return nil, ErrInvalidLength
Expand Down
8 changes: 4 additions & 4 deletions base32/base32_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func TestEncodeDecode(t *testing.T) {
t.Run(tc.name, func(t *testing.T) {
t.Parallel()

for i := 0; i < 1000; i++ {
for range 1000 {
// Generate 16 random bytes
data := make([]byte, 16)
_, err := rand.Read(data)
Expand Down Expand Up @@ -61,7 +61,7 @@ func TestEncodeDecode(t *testing.T) {
if err != nil {
t.Errorf("unexpected error during decode:\n%+v", err)
}
for i := 0; i < 16; i++ {
for i := range 16 {
if data[i] != decoded[i] {
t.Errorf("decoded value is not equal to original:\nExpected: %v\nActual: %v", data[i], decoded[i])
}
Expand All @@ -72,7 +72,7 @@ func TestEncodeDecode(t *testing.T) {

encoder := base32.NewEncoding("0123456789ABCDEFGHJKMNPQRSTVWXYZ")

for i := 0; i < 1000; i++ {
for range 1000 {
// Generate 16 random bytes
data := make([]byte, 16)
_, err := rand.Read(data)
Expand Down Expand Up @@ -100,7 +100,7 @@ func TestEncodeDecode(t *testing.T) {
if err != nil {
t.Errorf("unexpected error during decode:\n%+v", err)
}
for i := 0; i < 16; i++ {
for i := range 16 {
if data[i] != decoded[i] {
t.Errorf("decoded value is not equal to original:\nExpected: %v\nActual: %v", data[i], decoded[i])
}
Expand Down
4 changes: 2 additions & 2 deletions encoding_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ func TestTypeID_SQL_Scan(t *testing.T) {
t.Fatalf("create UserID: unexpected error:\n%+v", err)
}

scannerType := reflect.TypeOf((*sql.Scanner)(nil)).Elem()
if !reflect.TypeOf(&UserID{}).Implements(scannerType) {
scannerType := reflect.TypeFor[sql.Scanner]()
if !reflect.TypeFor[*UserID]().Implements(scannerType) {
t.Fatalf("typeid.TypeID instantiation implements the `sql.Scanner` interface")
}

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/sumup/typeid

go 1.24.0
go 1.25.0

require (
github.com/gofrs/uuid/v5 v5.4.0
Expand Down
Loading