Fix backend linter errors

This commit is contained in:
Alexander Zobnin
2023-08-30 12:48:38 +02:00
parent a536e6d8db
commit c06683cd37
12 changed files with 81 additions and 72 deletions

View File

@@ -6,6 +6,7 @@ import (
"time"
simplejson "github.com/bitly/go-simplejson"
"github.com/grafana/grafana-plugin-sdk-go/backend"
"github.com/grafana/grafana-plugin-sdk-go/backend/httpclient"
"github.com/grafana/grafana-plugin-sdk-go/backend/log"
@@ -14,6 +15,10 @@ import (
// New creates new HTTP client.
func New(dsInfo *backend.DataSourceInstanceSettings, timeout time.Duration) (*http.Client, error) {
clientOptions, err := dsInfo.HTTPClientOptions()
if err != nil {
return nil, err
}
clientOptions.Timeouts.Timeout = timeout
tlsSkipVerify, err := getTLSSkipVerify(dsInfo)