Skip to content

Commit

Permalink
Merge pull request #989 from ydb-platform/gochecknoinits
Browse files Browse the repository at this point in the history
gochecknoinits enabled
  • Loading branch information
asmyasnikov authored Dec 31, 2023
2 parents c6e0cb8 + b1ae101 commit de66cdd
Show file tree
Hide file tree
Showing 14 changed files with 13 additions and 14 deletions.
1 change: 0 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,6 @@ linters:
- funlen
- gci
- gochecknoglobals
- gochecknoinits
- gocognit
- goconst
- godot
Expand Down
2 changes: 1 addition & 1 deletion examples/auth/access_token_credentials/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion examples/auth/anonymous_credentials/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion examples/auth/metadata_credentials/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion examples/auth/service_account_credentials/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion examples/auth/static_credentials/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion examples/ddl/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion examples/decimal/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion examples/pagination/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion examples/read_table/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion examples/serverless/healthcheck/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion examples/serverless/url_shortener/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion examples/ttl/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion examples/ttl_readtable/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit de66cdd

Please sign in to comment.