Closed Marcellofabrizio closed 2 months ago
Hey @briancbarrow, I really appreciate the feedback, I'll be working on those comments as soon as I can. Regarding the suggested command, what should be the expected output?
Hey @briancbarrow, I really appreciate the feedback, I'll be working on those comments as soon as I can. Regarding the suggested command, what should be the expected output?
We should either change the code to accept it like
go-blueprint create --advanced true --feature htmx,githubaction
or like this (I think this will be easier to do).
go-blueprint create --advanced --feature htmx --feature githubaction
Hey @briancbarrow, I implemented the changes to print the correct command based on the new flags. Here's how it looks:
I also addressed your other comments.
Hey @briancbarrow, I implemented the changes to print the correct command based on the new flags. Here's how it looks:
I also addressed your other comments.
Sorry again for the late reply. Things are looking good. I did notice that now the steps for getting the htmx stuff working/generated are not printing as expected. See my comment above for that. I'm also still not getting the right output. I'm still getting
go-blueprint create --name my-proj --framework chi --driver mysql --advanced true
instead of the advanced features broken out. Can you confirm on your side that you are getting what is expected?
go-blueprint create --name my-proj --framework chi --driver mysql --advanced true
because my code is only handling the features added in flags, not the ones selected by the steps. I didn't consider this case when I added it. I'll change it to handle both cases.
- @briancbarrow Yes, I can replicate this. You're getting
go-blueprint create --name my-proj --framework chi --driver mysql --advanced true
because my code is only handling the features added in flags, not the ones selected by the steps. I didn't consider this case when I added it. I'll change it to handle both cases.
No worries. I should have more time this week to review things faster when you get that changed.
Hey @briancbarrow, it was a pretty simple fix, all I had to do was apply the same logic we are doing to the other flags, which is setting the selected value to the flag after we select them.
for key, opt := range options.Advanced.Choices {
project.AdvancedOptions[strings.ToLower(key)] = opt
err := cmd.Flag("feature").Value.Set(strings.ToLower(key))
if err != nil {
log.Fatal("failed to set the feature flag value", err)
}
}
This allows the values to be passed down to NonInteractiveCommand
and be printed as expected.
@briancbarrow Thank you!
Thank you for working on this @Marcellofabrizio !
By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.
Problem/Feature
Implementation of #183
Description of Changes:
Checklist
PS: I'm new to Go, so I would appreciate constructive feedback 😄