Skip to content

Conversation

julienrbrt
Copy link
Member

Closes: #4622

@julienrbrt julienrbrt added the backport/v28.x.y Backport to v28.x.y label Apr 16, 2025
@julienrbrt julienrbrt marked this pull request as ready for review April 16, 2025 12:45
for _, field := range f {
for i, field := range f {
// only the last field can be a variadic field
if i == len(f)-1 && field.IsSlice() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need to add the coins only as the last argument? Will the message not support a two-coin slice?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, that's correct, only one slice argument is supported. If you need multiple you should create a manual command

Copy link
Collaborator

Choose a reason for hiding this comment

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

may we should throw a warning or create a manual command in case the user tries to scaffold the slice of coins:

ignite s list employee bonus:coins salary:coins

Copy link
Member Author

Choose a reason for hiding this comment

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

Creating a manual command for cases AutoCLI falls short would be a great feature yeah. I do not think we should have a warming however.
I can log an issue for that.

@julienrbrt julienrbrt merged commit 7c53203 into main Apr 16, 2025
44 checks passed
@julienrbrt julienrbrt deleted the julien/fix-varargs branch April 16, 2025 14:44
mergify bot pushed a commit that referenced this pull request Apr 16, 2025
* feat(templates): set varargs in autocli config when needed

* updates

* fix

(cherry picked from commit 7c53203)

# Conflicts:
#	ignite/templates/field/fields.go
#	ignite/templates/typed/list/list.go
#	ignite/templates/typed/map/map.go
#	ignite/templates/typed/singleton/singleton.go
@julienrbrt julienrbrt removed the backport/v28.x.y Backport to v28.x.y label Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FIX: array of coin is not support as a autoCLI param
2 participants