From 34a486986b24081bea3f86104259a918f0b19b49 Mon Sep 17 00:00:00 2001 From: BuildTools Date: Tue, 1 Dec 2020 20:15:35 +0100 Subject: [PATCH] [GO][EDIT] moved tls option to Features and renamed it to TLS --- config/config.go | 2 +- main.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/config.go b/config/config.go index 3a29cba..ee6e99f 100644 --- a/config/config.go +++ b/config/config.go @@ -9,9 +9,9 @@ import ( // Config represents the configuration for the exporter type Config struct { - tls bool `yaml:"tls,omitempty"` Devices []Device `yaml:"devices"` Features struct { + TLS bool `yaml:"tls,omitempty"` BGP bool `yaml:"bgp,omitempty"` DHCP bool `yaml:"dhcp,omitempty"` DHCPL bool `yaml:"dhcpl,omitempty"` diff --git a/main.go b/main.go index 39fa3f6..88e2a3b 100644 --- a/main.go +++ b/main.go @@ -245,7 +245,7 @@ func collectorOptions() []collector.Option { opts = append(opts, collector.WithTimeout(*timeout)) } - if *tls || cfg.tls { + if *tls || cfg.Features.TLS { fmt.Printf("TLS activated\n"); opts = append(opts, collector.WithTLS(*insecure)) }