diff --git a/.golangci.yml b/.golangci.yml index 2bbe6a2d1..e19f5bdb1 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -223,7 +223,6 @@ linters: - funlen - gci - gochecknoglobals - - gochecknoinits - gocognit - goconst - godot diff --git a/examples/auth/access_token_credentials/main.go b/examples/auth/access_token_credentials/main.go index 8e5674148..3873d4c7d 100644 --- a/examples/auth/access_token_credentials/main.go +++ b/examples/auth/access_token_credentials/main.go @@ -14,7 +14,7 @@ var ( token string ) -func init() { +func init() { //nolint:gochecknoinits required := []string{"ydb", "token"} flagSet := flag.NewFlagSet(os.Args[0], flag.ExitOnError) flagSet.Usage = func() { diff --git a/examples/auth/anonymous_credentials/main.go b/examples/auth/anonymous_credentials/main.go index 9bc787964..c6f6f15d1 100644 --- a/examples/auth/anonymous_credentials/main.go +++ b/examples/auth/anonymous_credentials/main.go @@ -11,7 +11,7 @@ import ( var dsn string -func init() { +func init() { //nolint:gochecknoinits required := []string{"ydb"} flagSet := flag.NewFlagSet(os.Args[0], flag.ExitOnError) flagSet.Usage = func() { diff --git a/examples/auth/metadata_credentials/main.go b/examples/auth/metadata_credentials/main.go index f4a1a40f6..00e55ffc2 100644 --- a/examples/auth/metadata_credentials/main.go +++ b/examples/auth/metadata_credentials/main.go @@ -13,7 +13,7 @@ import ( var dsn string -func init() { +func init() { //nolint:gochecknoinits required := []string{"ydb"} flagSet := flag.NewFlagSet(os.Args[0], flag.ExitOnError) flagSet.Usage = func() { diff --git a/examples/auth/service_account_credentials/main.go b/examples/auth/service_account_credentials/main.go index e3ba931a9..879ea9ba7 100644 --- a/examples/auth/service_account_credentials/main.go +++ b/examples/auth/service_account_credentials/main.go @@ -16,7 +16,7 @@ var ( saFile string ) -func init() { +func init() { //nolint:gochecknoinits required := []string{"ydb", "sa-file"} flagSet := flag.NewFlagSet(os.Args[0], flag.ExitOnError) flagSet.Usage = func() { diff --git a/examples/auth/static_credentials/main.go b/examples/auth/static_credentials/main.go index 284c721c6..0cf072a61 100644 --- a/examples/auth/static_credentials/main.go +++ b/examples/auth/static_credentials/main.go @@ -15,7 +15,7 @@ var ( password string ) -func init() { +func init() { //nolint:gochecknoinits required := []string{"ydb", "user", "password"} flagSet := flag.NewFlagSet(os.Args[0], flag.ExitOnError) flagSet.Usage = func() { diff --git a/examples/ddl/main.go b/examples/ddl/main.go index 391892716..75bd8576d 100644 --- a/examples/ddl/main.go +++ b/examples/ddl/main.go @@ -17,7 +17,7 @@ var ( prefix string ) -func init() { +func init() { //nolint:gochecknoinits required := []string{"ydb"} flagSet := flag.NewFlagSet(os.Args[0], flag.ExitOnError) flagSet.Usage = func() { diff --git a/examples/decimal/main.go b/examples/decimal/main.go index 1091c3eb5..1662dc983 100644 --- a/examples/decimal/main.go +++ b/examples/decimal/main.go @@ -21,7 +21,7 @@ var ( prefix string ) -func init() { +func init() { //nolint:gochecknoinits required := []string{"ydb"} flagSet := flag.NewFlagSet(os.Args[0], flag.ExitOnError) flagSet.Usage = func() { diff --git a/examples/pagination/main.go b/examples/pagination/main.go index b3ebec589..4510f1f3a 100644 --- a/examples/pagination/main.go +++ b/examples/pagination/main.go @@ -18,7 +18,7 @@ var ( prefix string ) -func init() { +func init() { //nolint:gochecknoinits required := []string{"ydb"} flagSet := flag.NewFlagSet(os.Args[0], flag.ExitOnError) flagSet.Usage = func() { diff --git a/examples/read_table/main.go b/examples/read_table/main.go index cef81a4ae..931672e6f 100644 --- a/examples/read_table/main.go +++ b/examples/read_table/main.go @@ -20,7 +20,7 @@ var ( prefix string ) -func init() { +func init() { //nolint:gochecknoinits required := []string{"ydb"} flagSet := flag.NewFlagSet(os.Args[0], flag.ExitOnError) flagSet.Usage = func() { diff --git a/examples/serverless/healthcheck/main.go b/examples/serverless/healthcheck/main.go index b4731a872..fa44c3b72 100644 --- a/examples/serverless/healthcheck/main.go +++ b/examples/serverless/healthcheck/main.go @@ -35,7 +35,7 @@ func (u *URLs) Set(s string) error { return nil } -func init() { +func init() { //nolint:gochecknoinits required := []string{"ydb", "url"} flagSet := flag.NewFlagSet(os.Args[0], flag.ExitOnError) flagSet.Usage = func() { diff --git a/examples/serverless/url_shortener/main.go b/examples/serverless/url_shortener/main.go index 21c8f9ce0..40eadc06a 100644 --- a/examples/serverless/url_shortener/main.go +++ b/examples/serverless/url_shortener/main.go @@ -21,7 +21,7 @@ var ( logLevel string ) -func init() { +func init() { //nolint:gochecknoinits required := []string{"ydb"} flagSet := flag.NewFlagSet(os.Args[0], flag.ExitOnError) flagSet.Usage = func() { diff --git a/examples/ttl/main.go b/examples/ttl/main.go index 2e476db25..ff7836037 100644 --- a/examples/ttl/main.go +++ b/examples/ttl/main.go @@ -18,7 +18,7 @@ var ( prefix string ) -func init() { +func init() { //nolint:gochecknoinits required := []string{"ydb"} flagSet := flag.NewFlagSet(os.Args[0], flag.ExitOnError) flagSet.Usage = func() { diff --git a/examples/ttl_readtable/main.go b/examples/ttl_readtable/main.go index 384098474..54fd72d27 100644 --- a/examples/ttl_readtable/main.go +++ b/examples/ttl_readtable/main.go @@ -18,7 +18,7 @@ var ( prefix string ) -func init() { +func init() { //nolint:gochecknoinits required := []string{"ydb"} flagSet := flag.NewFlagSet(os.Args[0], flag.ExitOnError) flagSet.Usage = func() {