In my use case I am writing a CLI in golang with multiple group of arguments. For example
./gocli -test <test-name> -load <no-of-cases>
./gocli -startserver <server-name> -port <port-number>
./gocli -addhost <host-name>
CLI is used for different purposes. I could write a check for each flag variable and perform the actions. But is there any best approach to do this? Also I would like to validate the arguments for each group[For example, if any of the arguments missing in a group while others are given, CLI should throw an error]
Could anyone help me on this?