diff --git a/.github/workflows/lint_golang.yml b/.github/workflows/lint_golang.yml index ded602e0..6c8dbb79 100644 --- a/.github/workflows/lint_golang.yml +++ b/.github/workflows/lint_golang.yml @@ -19,5 +19,5 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v3 with: - version: v1.54.2 + version: v1.55.2 args: --verbose diff --git a/.golangci.yml b/.golangci.yml index 816724f4..6104af9b 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -51,14 +51,15 @@ linters-settings: disabled: true - name: nested-structs disabled: true + - name: unchecked-type-assertion + disabled: true gofmt: rewrite-rules: - - pattern: 'interface{}' - replacement: 'any' - - pattern: 'a[b:len(a)]' - replacement: 'a[b:]' - + - pattern: "interface{}" + replacement: "any" + - pattern: "a[b:len(a)]" + replacement: "a[b:]" linters: enable: diff --git a/client.go b/client.go index f0902f97..cb2bffe0 100644 --- a/client.go +++ b/client.go @@ -1,8 +1,8 @@ package filetypes import ( - csvFile "github.com/cloudquery/filetypes/v4/csv" - jsonFile "github.com/cloudquery/filetypes/v4/json" + csvfile "github.com/cloudquery/filetypes/v4/csv" + jsonfile "github.com/cloudquery/filetypes/v4/json" "github.com/cloudquery/filetypes/v4/parquet" "github.com/cloudquery/filetypes/v4/types" ) @@ -14,8 +14,8 @@ type Client struct { var ( _ types.FileType = (*Client)(nil) - _ types.FileType = (*csvFile.Client)(nil) - _ types.FileType = (*jsonFile.Client)(nil) + _ types.FileType = (*csvfile.Client)(nil) + _ types.FileType = (*jsonfile.Client)(nil) _ types.FileType = (*parquet.Client)(nil) ) @@ -34,17 +34,17 @@ func NewClient(spec *FileSpec) (*Client, error) { var client types.FileType switch spec.Format { case FormatTypeCSV: - opts := []csvFile.Options{ - csvFile.WithDelimiter([]rune(spec.csvSpec.Delimiter)[0]), + opts := []csvfile.Options{ + csvfile.WithDelimiter([]rune(spec.csvSpec.Delimiter)[0]), } if !spec.csvSpec.SkipHeader { - opts = append(opts, csvFile.WithHeader()) + opts = append(opts, csvfile.WithHeader()) } - client, err = csvFile.NewClient(opts...) + client, err = csvfile.NewClient(opts...) case FormatTypeJSON: - client, err = jsonFile.NewClient() + client, err = jsonfile.NewClient() case FormatTypeParquet: client, err = parquet.NewClient(parquet.WithSpec(*spec.parquetSpec)) diff --git a/spec.go b/spec.go index 98e36311..a2468c2e 100644 --- a/spec.go +++ b/spec.go @@ -6,7 +6,7 @@ import ( "fmt" "github.com/cloudquery/filetypes/v4/csv" - jsonFile "github.com/cloudquery/filetypes/v4/json" + jsonfile "github.com/cloudquery/filetypes/v4/json" "github.com/cloudquery/filetypes/v4/parquet" "github.com/invopop/jsonschema" orderedmap "github.com/wk8/go-ordered-map/v2" @@ -40,7 +40,7 @@ type FileSpec struct { Compression CompressionType `json:"compression,omitempty" jsonschema:"enum=,enum=gzip"` csvSpec *csv.Spec - jsonSpec *jsonFile.Spec + jsonSpec *jsonfile.Spec parquetSpec *parquet.Spec } @@ -48,7 +48,7 @@ func (FileSpec) JSONSchemaExtend(sc *jsonschema.Schema) { sc.ID = "/schemas/FileSpec" sc.Definitions = jsonschema.Definitions{ "CSVSpec": csv.Spec{}.JSONSchema(), - "JSONSpec": jsonFile.Spec{}.JSONSchema(), + "JSONSpec": jsonfile.Spec{}.JSONSchema(), "ParquetSpec": parquet.Spec{}.JSONSchema(), } @@ -160,7 +160,7 @@ func (s *FileSpec) UnmarshalSpec() error { s.csvSpec = &csv.Spec{} return dec.Decode(s.csvSpec) case FormatTypeJSON: - s.jsonSpec = &jsonFile.Spec{} + s.jsonSpec = &jsonfile.Spec{} return dec.Decode(s.jsonSpec) case FormatTypeParquet: s.parquetSpec = &parquet.Spec{} diff --git a/stream_test.go b/stream_test.go index 07508fb4..ddaa222d 100644 --- a/stream_test.go +++ b/stream_test.go @@ -2,7 +2,7 @@ package filetypes_test import ( "bufio" - fmt "fmt" + "fmt" "io" "testing"