go cobra: make flag persistent in one subcommand only Building from What is the difference between go-Cobra PersistentFlags and Flags?: