From 645d7a6e42cdae95e1a1e7f3ad4c75e97c286b53 Mon Sep 17 00:00:00 2001 From: Rob Best Date: Mon, 11 Mar 2019 17:51:29 +0000 Subject: [PATCH] Add defaults for the cert and key file flags. This could help reduce the number of flags passed to the exporter if the user is able to adhere to default. --- ssl_exporter.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ssl_exporter.go b/ssl_exporter.go index 1e75754..c38d248 100644 --- a/ssl_exporter.go +++ b/ssl_exporter.go @@ -253,8 +253,8 @@ func main() { insecure = kingpin.Flag("tls.insecure", "Skip certificate verification").Default("false").Bool() clientAuth = kingpin.Flag("tls.client-auth", "Enable client authentication").Default("false").Bool() caFile = kingpin.Flag("tls.cacert", "Local path to an alternative CA cert bundle").String() - certFile = kingpin.Flag("tls.cert", "Local path to a client certificate file (for client authentication)").String() - keyFile = kingpin.Flag("tls.key", "Local path to a private key file (for client authentication)").String() + certFile = kingpin.Flag("tls.cert", "Local path to a client certificate file (for client authentication)").Default("cert.pem").String() + keyFile = kingpin.Flag("tls.key", "Local path to a private key file (for client authentication)").Default("key.pem").String() ) log.AddFlags(kingpin.CommandLine)