diff options
author | 2021-01-26 09:18:40 +0100 | |
---|---|---|
committer | 2021-01-26 08:18:40 +0000 | |
commit | a9206996eb89314f7bf1c0b6c87e5da083615b8e (patch) | |
tree | 33ccf1ff1cd9527fb374d11bdf84884bb138d91c | |
parent | e222193539880da428188dcb035fd21846ecc794 (diff) | |
download | coredns-a9206996eb89314f7bf1c0b6c87e5da083615b8e.tar.gz coredns-a9206996eb89314f7bf1c0b6c87e5da083615b8e.tar.zst coredns-a9206996eb89314f7bf1c0b6c87e5da083615b8e.zip |
core: flag blacklisting not needed anymore (#4420)
Automatically submitted.
-rw-r--r-- | coremain/run.go | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/coremain/run.go b/coremain/run.go index 39505bff8..f4172fee6 100644 --- a/coremain/run.go +++ b/coremain/run.go @@ -35,21 +35,6 @@ func init() { // Run is CoreDNS's main() function. func Run() { caddy.TrapSignals() - - // Reset flag.CommandLine to get rid of unwanted flags for instance from glog (used in kubernetes). - // And read the ones we want to keep. - flag.VisitAll(func(f *flag.Flag) { - if _, ok := flagsBlacklist[f.Name]; ok { - return - } - flagsToKeep = append(flagsToKeep, f) - }) - - flag.CommandLine = flag.NewFlagSet(os.Args[0], flag.ExitOnError) - for _, f := range flagsToKeep { - flag.Var(f.Value, f.Name, f.Usage) - } - flag.Parse() if len(flag.Args()) > 0 { @@ -197,16 +182,3 @@ var ( // Gitcommit contains the commit where we built CoreDNS from. GitCommit string ) - -// flagsBlacklist removes flags with these names from our flagset. -var flagsBlacklist = map[string]struct{}{ - "logtostderr": {}, - "alsologtostderr": {}, - "v": {}, - "stderrthreshold": {}, - "vmodule": {}, - "log_backtrace_at": {}, - "log_dir": {}, -} - -var flagsToKeep []*flag.Flag |