Skip to content

Commit

Permalink
fix: second linter warnings fix
Browse files Browse the repository at this point in the history
Signed-off-by: Armin Schlegel <[email protected]>
  • Loading branch information
siredmar committed Mar 2, 2023
1 parent 7cddab6 commit 856f366
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
8 changes: 2 additions & 6 deletions internal/clients/nkey/accountSigningKey.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,10 @@ func ReadAccountSigningKey(c *vault.Client, operator string, account string, key
if err != nil {
return nil, false, err
}
ret := &natsbackend.NkeyParameters{}
status := false
if data != nil {
ret = &natsbackend.NkeyParameters{
return &natsbackend.NkeyParameters{
Seed: data.Seed,
}
status = data.Seed != ""
return ret, status, nil
}, data.Seed != "", nil
}
return nil, false, fmt.Errorf("account signing key %s not found", key)
}
Expand Down
8 changes: 2 additions & 6 deletions internal/clients/nkey/operatorSigningKey.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,10 @@ func ReadOperatorSigningKey(c *vault.Client, operator string, key string) (*nats
if err != nil {
return nil, false, err
}
ret := &natsbackend.NkeyParameters{}
status := false
if data != nil {
ret = &natsbackend.NkeyParameters{
return &natsbackend.NkeyParameters{
Seed: data.Seed,
}
status = data.Seed != ""
return ret, status, nil
}, data.Seed != "", nil
}
return nil, false, fmt.Errorf("operator signing key %s not found", key)
}
Expand Down

0 comments on commit 856f366

Please sign in to comment.