Skip to content

Commit

Permalink
ensurable fix
Browse files Browse the repository at this point in the history
  • Loading branch information
SivaanandM committed Nov 6, 2024
1 parent 0248c7b commit ef7e3c6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions client/team.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package client

import (
"errors"

clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1"
"github.com/spectrocloud/palette-sdk-go/api/models"
)
Expand Down Expand Up @@ -55,11 +56,11 @@ func (h *V1Client) GetTeamWithName(teamName string) (*models.V1Team, error) {
if resp.Payload.Items != nil {
if len(resp.Payload.Items) == 1 {
return resp.Payload.Items[0], nil
}
}
return nil, errors.New("More than one team found name: " + teamName)
} else {
return nil, errors.New("Team not found for name: " + teamName)
}
return nil, errors.New("Team not found for name: " + teamName)

}

// DeleteTeam deletes an existing team by UID.
Expand Down

0 comments on commit ef7e3c6

Please sign in to comment.