Skip to content

Commit

Permalink
Fix lint issues§
Browse files Browse the repository at this point in the history
g
  • Loading branch information
vicentepinto98 committed Oct 10, 2023
1 parent e1b6d88 commit 4f73517
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -275,11 +275,11 @@ func mapFields(credentialsGroupResp *objectstorage.CreateCredentialsGroupRespons
}
credentialsGroup := credentialsGroupResp.CredentialsGroup

mapCredentialsGroup(credentialsGroup, model)
mapCredentialsGroup(*credentialsGroup, model)
return nil
}

func mapCredentialsGroup(credentialsGroup *objectstorage.CredentialsGroup, model *Model) {
func mapCredentialsGroup(credentialsGroup objectstorage.CredentialsGroup, model *Model) {
model.CredentialsGroupId = types.StringPointerValue(credentialsGroup.CredentialsGroupId)
model.URN = types.StringPointerValue(credentialsGroup.Urn)
model.Name = types.StringPointerValue(credentialsGroup.DisplayName)
Expand Down Expand Up @@ -328,7 +328,7 @@ func readCredentialsGroups(ctx context.Context, model *Model, projectId string,
continue
}
found = true
mapCredentialsGroup(&credentialsGroup, model)
mapCredentialsGroup(credentialsGroup, model)
break
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type objectStorageClientMocked struct {
getCredentialsGroupsResponse *objectstorage.GetCredentialsGroupsResponse
}

func (c *objectStorageClientMocked) GetCredentialsGroupsExecute(ctx context.Context, projectId string) (*objectstorage.GetCredentialsGroupsResponse, error) {
func (c *objectStorageClientMocked) GetCredentialsGroupsExecute(_ context.Context, _ string) (*objectstorage.GetCredentialsGroupsResponse, error) {
if c.getCredentialsGroupsFails {
return c.getCredentialsGroupsResponse, fmt.Errorf("get credentials groups failed")
}
Expand Down Expand Up @@ -221,7 +221,6 @@ func TestReadCredentialsGroups(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.description, func(t *testing.T) {

client := &objectStorageClientMocked{
getCredentialsGroupsFails: tt.getCredentialsGroupsFails,
getCredentialsGroupsResponse: tt.mockedResp,
Expand Down

0 comments on commit 4f73517

Please sign in to comment.