Skip to content

Commit 3945bb9

Browse files
committed
updated packages
1 parent a2266e8 commit 3945bb9

File tree

8 files changed

+28
-9
lines changed

8 files changed

+28
-9
lines changed

.golangci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ linters:
1111
- goerr113
1212
- gocognit
1313
- dupl
14+
- depguard
1415

1516
issues:
1617
fix: true

Taskfile.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ tasks:
7676
cmds:
7777
- go mod tidy
7878

79+
updatedeps:
80+
cmds:
81+
- go get -u ./...
82+
7983
default:
8084
silent: true
8185
cmds:

cmd/vault/main.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ import (
88
)
99

1010
func main() {
11-
err := cli.Init()
12-
if err != nil {
11+
if err := cli.Init(); err != nil {
1312
//nolint
1413
fmt.Println("-----------------")
1514
//nolint
@@ -19,8 +18,7 @@ func main() {
1918
os.Exit(0)
2019
}
2120

22-
err = cli.Parse()
23-
if err != nil {
21+
if err := cli.Parse(); err != nil {
2422
//nolint
2523
fmt.Println("-----------------")
2624
//nolint

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ module github.com/231tr0n/vault
22

33
go 1.20
44

5-
require golang.org/x/term v0.8.0
5+
require golang.org/x/term v0.11.0
66

7-
require golang.org/x/sys v0.8.0 // indirect
7+
require golang.org/x/sys v0.11.0 // indirect

go.sum

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU=
22
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
3+
golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM=
4+
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
35
golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols=
46
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
7+
golang.org/x/term v0.11.0 h1:F9tnn/DA/Im8nCwm+fX+1/eBwi4qFjRT++MhtVC4ZX0=
8+
golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU=

internal/cli/cli.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ import (
1212
)
1313

1414
func wrap(err error) error {
15-
return fmt.Errorf("cli: %w", err)
15+
if err != nil {
16+
return fmt.Errorf("cli: %w", err)
17+
}
18+
19+
return nil
1620
}
1721

1822
// Init initlialises the passwdstore.

pkg/crypto/crypto.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ const (
2121
var ErrWrongPasswd = errors.New("crypto: wrong password")
2222

2323
func wrap(err error) error {
24-
return fmt.Errorf("crypto: %w", err)
24+
if err != nil {
25+
return fmt.Errorf("crypto: %w", err)
26+
}
27+
28+
return nil
2529
}
2630

2731
// Encrypt encrypts "s" with password "p" using aes and gcm.

pkg/passwdstore/passwdstore.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ type passwdStore struct {
2121
}
2222

2323
func wrap(err error) error {
24-
return fmt.Errorf("passwdstore: %w", err)
24+
if err != nil {
25+
return fmt.Errorf("passwdstore: %w", err)
26+
}
27+
28+
return nil
2529
}
2630

2731
func newpasswdStore() passwdStore {

0 commit comments

Comments
 (0)