I'm using spf13/cobra with an "update" subcommand, and the sanity check fails as it calls the binary without arguments, which means the help page is printed, instead of the token.
I can add the "missing" arg before execute, Iff I know I need it - when OVERSEER_BIN_UPD env var is set. So this constant should be exported, and the needed special behaviour of the binary documented.
From what I understand, your command-line parsing library is showing the help text before overseer runs, so the sanity check fails, since this code never gets to execute.
I'll expose an overseer.SanityCheck() function which either does nothing or does this and a os.Exit(0).
I'm using spf13/cobra with an "update" subcommand, and the sanity check fails as it calls the binary without arguments, which means the help page is printed, instead of the token.
I can add the "missing" arg before execute, Iff I know I need it - when OVERSEER_BIN_UPD env var is set. So this constant should be exported, and the needed special behaviour of the binary documented.