Fixed not needed error handling

This commit is contained in:
Neb, Sebastian 2019-02-26 09:14:37 +01:00
parent 0e05facc05
commit 918899e434

View file

@ -78,10 +78,7 @@ func (cmd *PrometheusAdapter) makePromClient() (prom.Client, error) {
var httpClient *http.Client var httpClient *http.Client
if cmd.SkipTLSVerification { if cmd.SkipTLSVerification {
prometheusInsecureClient, err := makePrometheusInsecureClient() prometheusInsecureClient := makePrometheusInsecureClient()
if err != nil {
return nil, err
}
httpClient = prometheusInsecureClient httpClient = prometheusInsecureClient
glog.Info("successfully skipped tls verification") glog.Info("successfully skipped tls verification")
} else if cmd.PrometheusCAFile != "" { } else if cmd.PrometheusCAFile != "" {
@ -328,7 +325,6 @@ func makePrometheusInsecureClient() (*http.Client) {
return &http.Client{ return &http.Client{
Transport: &http.Transport{ Transport: &http.Transport{
TLSClientConfig: &tls.Config{ TLSClientConfig: &tls.Config{
RootCAs: pool,
SkipTLSVerification: true SkipTLSVerification: true
}, },
}, },