First of all, I really like your approach and I am currently trying this out in a larger software project that we try to migrate away from viper/cobra. What "bothers" me a little bit is the way flags are accessed. Currently I need to write
cli.GetFlag(state, "my-flag")
This somehow seems redundant, I would either expect to use something like cli.GetFlag("my-flag") to fetch it from a sort of global state - that does not exist (yet?) or state.GetFlag("my-flag"). What was the reasoning behind the current approach?
First of all, I really like your approach and I am currently trying this out in a larger software project that we try to migrate away from viper/cobra. What "bothers" me a little bit is the way flags are accessed. Currently I need to write
This somehow seems redundant, I would either expect to use something like
cli.GetFlag("my-flag")to fetch it from a sort of global state - that does not exist (yet?) orstate.GetFlag("my-flag"). What was the reasoning behind the current approach?