From 8c5d1e02523dda42b0969a3507193c0ee602ec92 Mon Sep 17 00:00:00 2001 From: Mike Farah Date: Fri, 26 Nov 2021 20:24:21 +1100 Subject: [PATCH] gci linter --- .golangci.yml | 1 + go.sum | 1 - pkg/yqlib/doc/equals.md | 2 +- pkg/yqlib/doc/string-operators.md | 2 +- pkg/yqlib/operator_add.go | 1 - pkg/yqlib/operator_comments.go | 2 -- pkg/yqlib/operator_multiply.go | 3 +-- pkg/yqlib/operator_subtract.go | 1 - 8 files changed, 4 insertions(+), 9 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index ae8999ed..7a9f27b7 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -3,6 +3,7 @@ run: linters: enable: - errorlint + - gci - gofmt - goimports - gosec diff --git a/go.sum b/go.sum index 4ccfbb19..513b09cc 100644 --- a/go.sum +++ b/go.sum @@ -471,7 +471,6 @@ golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.2 h1:kRBLX7v7Af8W7Gdbbc908OJcdgtK8bOz9Uaj8/F1ACA= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/pkg/yqlib/doc/equals.md b/pkg/yqlib/doc/equals.md index d7129a79..17771963 100644 --- a/pkg/yqlib/doc/equals.md +++ b/pkg/yqlib/doc/equals.md @@ -108,7 +108,7 @@ will output a: frog ``` -## Two non existant keys are equal +## Two non existent keys are equal Given a sample.yml file of: ```yaml a: frog diff --git a/pkg/yqlib/doc/string-operators.md b/pkg/yqlib/doc/string-operators.md index dafe6f30..ec6ef53f 100644 --- a/pkg/yqlib/doc/string-operators.md +++ b/pkg/yqlib/doc/string-operators.md @@ -209,7 +209,7 @@ will output ``` ## Test using regex -Like jq'q equivalant, this works like match but only returns true/false instead of full match details +Like jq'q equivalent, this works like match but only returns true/false instead of full match details Given a sample.yml file of: ```yaml diff --git a/pkg/yqlib/operator_add.go b/pkg/yqlib/operator_add.go index 1473bbfc..0a141ab6 100644 --- a/pkg/yqlib/operator_add.go +++ b/pkg/yqlib/operator_add.go @@ -2,7 +2,6 @@ package yqlib import ( "fmt" - "strconv" yaml "gopkg.in/yaml.v3" diff --git a/pkg/yqlib/operator_comments.go b/pkg/yqlib/operator_comments.go index 9671bc50..ebc78b9d 100644 --- a/pkg/yqlib/operator_comments.go +++ b/pkg/yqlib/operator_comments.go @@ -1,8 +1,6 @@ package yqlib import ( - // "bufio" - // "bytes" "bufio" "bytes" "container/list" diff --git a/pkg/yqlib/operator_multiply.go b/pkg/yqlib/operator_multiply.go index a60f0287..ff0410e9 100644 --- a/pkg/yqlib/operator_multiply.go +++ b/pkg/yqlib/operator_multiply.go @@ -1,11 +1,10 @@ package yqlib import ( + "container/list" "fmt" "strconv" - "container/list" - "github.com/jinzhu/copier" yaml "gopkg.in/yaml.v3" ) diff --git a/pkg/yqlib/operator_subtract.go b/pkg/yqlib/operator_subtract.go index 6a74ab27..51d68cbf 100644 --- a/pkg/yqlib/operator_subtract.go +++ b/pkg/yqlib/operator_subtract.go @@ -2,7 +2,6 @@ package yqlib import ( "fmt" - "strconv" "gopkg.in/yaml.v3"