Skip to content

Commit 5dc9654

Browse files
authored
chore: Go 1.21 follow-ups (#1255)
1 parent 41a6561 commit 5dc9654

File tree

10 files changed

+11
-12
lines changed

10 files changed

+11
-12
lines changed

.github/workflows/lint_golang.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ jobs:
2020
- name: golangci-lint
2121
uses: golangci/golangci-lint-action@v3
2222
with:
23-
version: v1.53.3
23+
version: v1.54.2

.golangci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
run:
22
tests: true
33
timeout: 10m
4-
skip-dirs:
5-
- internal/pb
64

75
linters-settings:
86
errcheck:

internal/random/random.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ var letters = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
1515

1616
func randSeq(n int) string {
1717
b := make([]rune, n)
18-
rand.Seed(time.Now().UnixNano())
18+
rnd := rand.New(rand.NewSource(time.Now().UnixNano()))
1919
for i := range b {
20-
b[i] = letters[rand.Intn(len(letters))]
20+
b[i] = letters[rnd.Intn(len(letters))]
2121
}
2222
return string(b)
2323
}

message/sync_message.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
package message
22

33
import (
4+
"slices"
5+
46
"github.com/apache/arrow/go/v14/arrow"
57
"github.com/cloudquery/plugin-sdk/v4/schema"
6-
"golang.org/x/exp/slices"
78
)
89

910
type syncBaseMessage struct {

message/write_message.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
package message
22

33
import (
4+
"slices"
45
"time"
56

67
"github.com/apache/arrow/go/v14/arrow"
78
"github.com/cloudquery/plugin-sdk/v4/schema"
8-
"golang.org/x/exp/slices"
99
)
1010

1111
type writeBaseMessage struct{}

schema/resource.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ package schema
33
import (
44
"crypto/sha256"
55
"fmt"
6+
"slices"
67

78
"github.com/cloudquery/plugin-sdk/v4/scalar"
89
"github.com/google/uuid"
9-
"golang.org/x/exp/slices"
1010
)
1111

1212
type Resources []*Resource

schema/table.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import (
44
"context"
55
"fmt"
66
"regexp"
7+
"slices"
78

89
"github.com/apache/arrow/go/v14/arrow"
910
"github.com/cloudquery/plugin-sdk/v4/glob"
10-
"golang.org/x/exp/slices"
1111
)
1212

1313
// TableResolver is the main entry point when a table is sync is called.

state/state.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ package state
33
import (
44
"context"
55
"fmt"
6+
"slices"
67

78
pbDiscovery "github.com/cloudquery/plugin-pb-go/pb/discovery/v1"
89
pbPluginV3 "github.com/cloudquery/plugin-pb-go/pb/plugin/v3"
910
stateV3 "github.com/cloudquery/plugin-sdk/v4/internal/clients/state/v3"
10-
"golang.org/x/exp/slices"
1111
"google.golang.org/grpc"
1212
)
1313

transformers/struct.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"fmt"
55
"net"
66
"reflect"
7+
"slices"
78
"strings"
89
"time"
910

@@ -12,7 +13,6 @@ import (
1213
"github.com/cloudquery/plugin-sdk/v4/schema"
1314
"github.com/cloudquery/plugin-sdk/v4/types"
1415
"github.com/thoas/go-funk"
15-
"golang.org/x/exp/slices"
1616
)
1717

1818
type structTransformer struct {

transformers/struct_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ package transformers
33
import (
44
"net"
55
"reflect"
6+
"slices"
67
"testing"
78
"time"
89

910
"github.com/apache/arrow/go/v14/arrow"
1011
"github.com/cloudquery/plugin-sdk/v4/schema"
1112
"github.com/cloudquery/plugin-sdk/v4/types"
1213
"github.com/google/go-cmp/cmp"
13-
"golang.org/x/exp/slices"
1414
)
1515

1616
type (

0 commit comments

Comments
 (0)