Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
C
Coredns
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Railgun
Coredns
Commits
a9206996
Commit
a9206996
authored
Jan 26, 2021
by
Miek Gieben
Committed by
GitHub
Jan 26, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core: flag blacklisting not needed anymore (#4420)
Automatically submitted.
parent
e2221935
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
28 deletions
+0
-28
coremain/run.go
coremain/run.go
+0
-28
No files found.
coremain/run.go
View file @
a9206996
...
@@ -35,21 +35,6 @@ func init() {
...
@@ -35,21 +35,6 @@ func init() {
// Run is CoreDNS's main() function.
// Run is CoreDNS's main() function.
func
Run
()
{
func
Run
()
{
caddy
.
TrapSignals
()
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
()
flag
.
Parse
()
if
len
(
flag
.
Args
())
>
0
{
if
len
(
flag
.
Args
())
>
0
{
...
@@ -197,16 +182,3 @@ var (
...
@@ -197,16 +182,3 @@ var (
// Gitcommit contains the commit where we built CoreDNS from.
// Gitcommit contains the commit where we built CoreDNS from.
GitCommit
string
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment