Skip to content

Conversation

@giornetta
Copy link
Member

When deleting multiple resources, we're pluralizing the resource type in case multiple resources were deleted at the same time, so that the CLI displays the correct word to the user.

However, the rest of the phrases were not being pluralized correctly.

This fixes it by internalizing the dependency on github.com/alejandrojnm/go-pluralize and extending it by adding a utility pluralize.Has function that uses pluralize.Pluralize to correctly display "has" or "have" depending on the size argument passed in.

This new utility has been added to all cases where this problem could be found (mostly when deleting multiple resources at once).

Copy link
Contributor

@fulviodenza fulviodenza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@giornetta giornetta merged commit 010ec28 into master Nov 25, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants