-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Amtool and Alertmanager binaries print to stdout #2505
Conversation
cmd/alertmanager/main.go
Outdated
@@ -209,7 +209,8 @@ func run() int { | |||
peerReconnectTimeout = kingpin.Flag("cluster.reconnect-timeout", "Length of time to attempt to reconnect to a lost peer.").Default(cluster.DefaultReconnectTimeout.String()).Duration() | |||
) | |||
|
|||
promlogflag.AddFlags(kingpin.CommandLine, &promlogConfig) | |||
a := kingpin.CommandLine.UsageWriter(os.Stdout) | |||
promlogflag.AddFlags(a, &promlogConfig) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't we use kingpin.CommandLine here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I didn't understand what you mean, could you elaborate?
cmd/alertmanager/main.go
Outdated
a := kingpin.CommandLine.UsageWriter(os.Stdout) | ||
promlogflag.AddFlags(a, &promlogConfig) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a := kingpin.CommandLine.UsageWriter(os.Stdout) | |
promlogflag.AddFlags(a, &promlogConfig) | |
promlogflag.AddFlags(kingpin.CommandLine, &promlogConfig) | |
kingpin.CommandLine.UsageWriter(os.Stdout) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a friendly bump to tell that I've commited your suggestion :)
Signed-off-by: ArthurSens <[email protected]>
Thanks! |
cc @roidelapluie