feat(templates): set varargs in autocli config when needed#4624
Merged
julienrbrt merged 3 commits intomainfrom Apr 16, 2025
Merged
feat(templates): set varargs in autocli config when needed#4624julienrbrt merged 3 commits intomainfrom
julienrbrt merged 3 commits intomainfrom
Conversation
Pantani
reviewed
Apr 16, 2025
| 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() { |
Collaborator
There was a problem hiding this comment.
Do we need to add the coins only as the last argument? Will the message not support a two-coin slice?
Member
Author
There was a problem hiding this comment.
Yes, that's correct, only one slice argument is supported. If you need multiple you should create a manual command
Collaborator
There was a problem hiding this comment.
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
Member
Author
There was a problem hiding this comment.
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.
Pantani
approved these changes
Apr 16, 2025
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes: #4622