Skip to content
This repository has been archived by the owner on Jan 21, 2025. It is now read-only.

Commit

Permalink
fix: fixed linter warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
siredmar committed Mar 2, 2023
1 parent dc31629 commit 7cddab6
Showing 3 changed files with 6 additions and 20 deletions.
8 changes: 2 additions & 6 deletions internal/clients/issue/account.go
Original file line number Diff line number Diff line change
@@ -19,16 +19,12 @@ func ReadAccount(c *vault.Client, operator string, account string) (*v1alpha1.Ac
if err != nil {
return nil, nil, err
}
ret := &v1alpha1.AccountParameters{}
status := &natsbackend.IssueAccountStatus{}
if resp != nil {
ret = &v1alpha1.AccountParameters{
return &v1alpha1.AccountParameters{
Operator: resp.Operator,
Claims: resp.Claims,
UseSigningKey: resp.UseSigningKey,
}
status = &resp.Status
return ret, status, nil
}, &resp.Status, nil
}
return nil, nil, fmt.Errorf("account %s in operator %s not found", account, operator)
}
9 changes: 2 additions & 7 deletions internal/clients/issue/operator.go
Original file line number Diff line number Diff line change
@@ -19,17 +19,12 @@ func ReadOperator(c *vault.Client, operator string) (*v1alpha1.OperatorParameter
if err != nil {
return nil, nil, err
}

ret := &v1alpha1.OperatorParameters{}
status := &natsbackend.IssueOperatorStatus{}
if resp != nil {
ret = &v1alpha1.OperatorParameters{
return &v1alpha1.OperatorParameters{
CreateSystemAccount: resp.CreateSystemAccount,
SyncAccountServer: resp.SyncAccountServer,
Claims: resp.Claims,
}
status = &resp.Status
return ret, status, nil
}, &resp.Status, nil
}
return nil, nil, fmt.Errorf("operator %s not found", operator)
}
9 changes: 2 additions & 7 deletions internal/clients/issue/user.go
Original file line number Diff line number Diff line change
@@ -19,18 +19,13 @@ func ReadUser(c *vault.Client, operator string, account string, user string) (*v
if err != nil {
return nil, nil, err
}
ret := &v1alpha1.UserParameters{}
status := &natsbackend.IssueUserStatus{}
if resp != nil {

ret = &v1alpha1.UserParameters{
return &v1alpha1.UserParameters{
Operator: resp.Operator,
Account: resp.Account,
Claims: resp.Claims,
UseSigningKey: resp.UseSigningKey,
}
status = &resp.Status
return ret, status, nil
}, &resp.Status, nil
}
return nil, nil, fmt.Errorf("user %s in account %s in operator %s not found", user, account, operator)
}

0 comments on commit 7cddab6

Please sign in to comment.