Replies: 1 comment
-
Hey there! Yes, you can certainly do this! How I would approach this is to create a form to prompt the user how many burgers they want. Like so: var numberOfBurgers int
_ = huh.NewSelect[int](huh.NewOptions(1, 2, 3, 4, 5)...).Value(&numberOfBurgers).Run() Then, show the form var burgersList []Burger
var burger Burger
for i := 0; i < numberOfBurgers; i++ {
// Run burger form as normal.
// Store this finished burger.
burgersList = append(burgersList, burger)
}
// Print out summary of burger
for _, b := range burgerList {
// Print burger
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I just tinkering around getting more familiar with huh and the possibilities.
Specially the burger intro example shows allot of possibilities, now I wonder what would be the approach if we order multiple burgers in one run of the form?
E.g.:
Beta Was this translation helpful? Give feedback.
All reactions