Skip to content

Commit 2901c1a

Browse files
authored
chore: Upgrade to Go 1.19 (#74)
* Upgrade to Go 1.19 * Upgrade golangci-lint * Fix linting errors
1 parent 3671366 commit 2901c1a

File tree

7 files changed

+7
-10
lines changed

7 files changed

+7
-10
lines changed

.github/workflows/lint_golang.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ jobs:
1515
- uses: actions/checkout@v3
1616
- uses: actions/setup-go@v3
1717
with:
18-
go-version: 1.18
18+
go-version: 1.19
1919
- name: golangci-lint
2020
uses: golangci/golangci-lint-action@v3
2121
with:
22-
version: v1.47.3
22+
version: v1.49.0
2323
args: --verbose

.github/workflows/unittest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- name: Set up Go 1.x
1414
uses: actions/setup-go@v3
1515
with:
16-
go-version: 1.18
16+
go-version: 1.19
1717
- name: Check out code into the Go module directory
1818
uses: actions/checkout@v3
1919
- uses: actions/cache@v3

codegen/doc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
//codgen helps autogenerate cloudquery plugins configured by definition
1+
// codgen helps autogenerate cloudquery plugins configured by definition
22
package codegen

docs/source_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package docs
22

33
import (
44
"context"
5-
"io/ioutil"
65
"os"
76
"path"
87
"testing"
@@ -100,7 +99,7 @@ func TestGenerateSourcePluginDocs(t *testing.T) {
10099

101100
for _, exp := range expectFiles {
102101
output := path.Join(tmpdir, exp.Name)
103-
got, err := ioutil.ReadFile(output)
102+
got, err := os.ReadFile(output)
104103
if err != nil {
105104
t.Fatalf("error reading %q: %v ", exp.Name, err)
106105
}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/cloudquery/plugin-sdk
22

3-
go 1.17
3+
go 1.19
44

55
require (
66
github.com/cloudquery/faker/v3 v3.7.7

schema/table.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import (
1919
// - meta(ClientMeta): is the client returned by the plugin.Provider Configure call
2020
// - parent(Resource): resource is the parent resource in case this table is called via parent table (i.e. relation)
2121
// - res(chan interface{}): is a channel to pass results fetched by the TableResolver
22-
//
2322
type TableResolver func(ctx context.Context, meta ClientMeta, parent *Resource, res chan<- interface{}) error
2423

2524
type RowResolver func(ctx context.Context, meta ClientMeta, resource *Resource) error

specs/spec_reader.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package specs
22

33
import (
44
"fmt"
5-
"io/ioutil"
65
"os"
76
"path/filepath"
87
"strings"
@@ -18,7 +17,7 @@ func NewSpecReader(directory string) (*SpecReader, error) {
1817
sources: make(map[string]Source),
1918
destinations: make(map[string]Destination),
2019
}
21-
files, err := ioutil.ReadDir(directory)
20+
files, err := os.ReadDir(directory)
2221
if err != nil {
2322
return nil, fmt.Errorf("failed to read directory %s: %w", directory, err)
2423
}

0 commit comments

Comments
 (0)