Skip to content

Commit d6434d1

Browse files
committed
Update dependencies and fix new linter issues
1 parent 0bda074 commit d6434d1

File tree

11 files changed

+99
-91
lines changed

11 files changed

+99
-91
lines changed

.golangci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ linters:
2020
- tagliatelle
2121
- testpackage
2222
- varnamelen
23+
- wsl
2324
settings:
2425
depguard:
2526
rules:

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ GOFMT=$(shell which gofmt)
149149
GOTEST=GOPATH=$(GOPATH) $(shell which gotest)
150150
GODOC=GOPATH=$(GOPATH) $(shell which godoc)
151151
GOLANGCILINT=$(BINUTIL)/golangci-lint
152-
GOLANGCILINTVERSION=v2.1.6
152+
GOLANGCILINTVERSION=v2.2.1
153153
DOCKERIZEVERSION=v0.9.2
154154

155155
# Current operating system and architecture as one string.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.4.1
1+
5.4.2

cmd/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ func main() {
2626
}
2727

2828
// execute the root command and log errors (if any)
29-
if err = rootCmd.Execute(); err != nil {
29+
err = rootCmd.Execute()
30+
if err != nil {
3031
logging.LogFatal("UNABLE TO RUN THE COMMAND", zap.Error(err))
3132
}
3233
}

go.mod

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ module github.com/tecnickcom/rndpwd
22

33
go 1.24
44

5-
toolchain go1.24.4
5+
toolchain go1.24.5
66

77
require (
8-
github.com/Vonage/gosrvlib v1.102.2
9-
github.com/go-playground/validator/v10 v10.26.0
8+
github.com/Vonage/gosrvlib v1.102.6
9+
github.com/go-playground/validator/v10 v10.27.0
1010
github.com/golang/mock v1.6.0
1111
github.com/jstemmer/go-junit-report/v2 v2.1.0
1212
github.com/prometheus/client_golang v1.22.0
@@ -77,7 +77,7 @@ require (
7777
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
7878
github.com/prometheus/client_model v0.6.2 // indirect
7979
github.com/prometheus/common v0.65.0 // indirect
80-
github.com/prometheus/procfs v0.16.1 // indirect
80+
github.com/prometheus/procfs v0.17.0 // indirect
8181
github.com/sagikazarmark/crypt v0.29.0 // indirect
8282
github.com/sagikazarmark/locafero v0.9.0 // indirect
8383
github.com/sourcegraph/conc v0.3.0 // indirect
@@ -102,15 +102,15 @@ require (
102102
golang.org/x/mod v0.25.0 // indirect
103103
golang.org/x/net v0.41.0 // indirect
104104
golang.org/x/oauth2 v0.30.0 // indirect
105-
golang.org/x/sync v0.15.0 // indirect
106-
golang.org/x/sys v0.33.0 // indirect
107-
golang.org/x/text v0.26.0 // indirect
105+
golang.org/x/sync v0.16.0 // indirect
106+
golang.org/x/sys v0.34.0 // indirect
107+
golang.org/x/text v0.27.0 // indirect
108108
golang.org/x/time v0.12.0 // indirect
109109
golang.org/x/tools v0.34.0 // indirect
110-
google.golang.org/api v0.239.0 // indirect
111-
google.golang.org/genproto v0.0.0-20250603155806-513f23925822 // indirect
112-
google.golang.org/genproto/googleapis/api v0.0.0-20250603155806-513f23925822 // indirect
113-
google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822 // indirect
110+
google.golang.org/api v0.241.0 // indirect
111+
google.golang.org/genproto v0.0.0-20250707201910-8d1bb00bc6a7 // indirect
112+
google.golang.org/genproto/googleapis/api v0.0.0-20250707201910-8d1bb00bc6a7 // indirect
113+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250707201910-8d1bb00bc6a7 // indirect
114114
google.golang.org/grpc v1.73.0 // indirect
115115
google.golang.org/protobuf v1.36.6 // indirect
116116
gopkg.in/yaml.v3 v3.0.1 // indirect

go.sum

Lines changed: 68 additions & 68 deletions
Large diffs are not rendered by default.

internal/cli/cli.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ func New(version, release string, bootstrapFn bootstrapFunc) (*cobra.Command, er
3636
rootCmd.RunE = func(_ *cobra.Command, _ []string) error {
3737
// Read CLI configuration
3838
cfg := &appConfig{}
39-
if err := config.Load(AppName, argConfigDir, appEnvPrefix, cfg); err != nil {
39+
40+
err := config.Load(AppName, argConfigDir, appEnvPrefix, cfg)
41+
if err != nil {
4042
return fmt.Errorf("failed loading config: %w", err)
4143
}
4244

@@ -90,7 +92,8 @@ func New(version, release string, bootstrapFn bootstrapFunc) (*cobra.Command, er
9092

9193
rootCmd.AddCommand(versionCmd)
9294

93-
if err := rootCmd.ParseFlags(os.Args); err != nil {
95+
err := rootCmd.ParseFlags(os.Args)
96+
if err != nil {
9497
return nil, fmt.Errorf("failed parsing comman-line arguments: %w", err)
9598
}
9699

internal/cli/cli_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ func TestNew(t *testing.T) {
104104
var out string
105105

106106
cmd, err := New("0.0.0-test", "0", bootstrapFunc)
107-
108107
if err == nil {
109108
require.NotNil(t, cmd)
110109

internal/cli/config.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,11 @@ type randomConfig struct {
5757
// appConfig contains the full application configuration.
5858
type appConfig struct {
5959
config.BaseConfig `mapstructure:",squash" validate:"required"`
60-
Enabled bool `mapstructure:"enabled"`
61-
Servers cfgServers `mapstructure:"servers" validate:"required"`
62-
Clients cfgClients `mapstructure:"clients" validate:"required"`
63-
Random randomConfig `mapstructure:"random" validate:"required"`
60+
61+
Enabled bool `mapstructure:"enabled"`
62+
Servers cfgServers `mapstructure:"servers" validate:"required"`
63+
Clients cfgClients `mapstructure:"clients" validate:"required"`
64+
Random randomConfig `mapstructure:"random" validate:"required"`
6465
}
6566

6667
// SetDefaults sets the default configuration values in Viper.

internal/cli/config_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,9 @@ func Test_appConfig_Validate(t *testing.T) {
214214
t.Parallel()
215215

216216
cfg := tt.fcfg(getValidTestConfig())
217-
if err := cfg.Validate(); (err != nil) != tt.wantErr {
217+
218+
err := cfg.Validate()
219+
if (err != nil) != tt.wantErr {
218220
t.Errorf("Validate() error = %v, wantErr %v", err, tt.wantErr)
219221
}
220222
})

0 commit comments

Comments
 (0)