Hi i just want to know if it is posible to declare a flag just with the shorthand and without requiring a value something like docker-compose up -d just the flag alone
Yes, you can use a boolean flag to achieve this behaviour.
example: rootCmd.BoolVarP(&verbose, "verbose", "v", false, "verbose output")
Same question.
Same question.
Same answer, I guess:
You can use a boolean flag to achieve this behaviour:
rootCmd.BoolVarP(&verbose, "verbose", "v", false, "verbose output")
Most helpful comment
Same answer, I guess: