Currently those two functions only accept *kingpin.Application as the first argument, When we use these methods in subcommands, we must wrap them again instead of calling them directly. here's a proposal
type flagGroup interface {
Flag(string, string) *kingpin.FlagClause
}
func AddFlags(a flagGroup, defaultAddress string) *web.FlagConfig ...
func AddFlags(a flagGroup, config *promlog.Config) ...
This change won't impact existing method calls and ensures compatibility.