update linter version to 1.46.2

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
This commit is contained in:
Ramkumar Chinchani
2022-05-18 20:19:39 +00:00
committed by Ramkumar Chinchani
parent 32afe712d6
commit 287ac05ddc
6 changed files with 12 additions and 7 deletions
+2 -1
View File
@@ -3,6 +3,7 @@ package cli
import (
"context"
"fmt"
"net"
"net/http"
"time"
@@ -86,7 +87,7 @@ func newScrubCmd(conf *config.Config) *cobra.Command {
// checking if the server is already running
req, err := http.NewRequestWithContext(context.Background(),
http.MethodGet,
fmt.Sprintf("http://%s:%s/v2", conf.HTTP.Address, conf.HTTP.Port),
fmt.Sprintf("http://%s/v2", net.JoinHostPort(conf.HTTP.Address, conf.HTTP.Port)),
nil)
if err != nil {
log.Error().Err(err).Msg("unable to create a new http request")
+4 -2
View File
@@ -6,6 +6,7 @@ import (
"encoding/json"
"fmt"
"io"
"net"
"net/http"
"os"
"path"
@@ -13,7 +14,8 @@ import (
"testing"
godigest "github.com/opencontainers/go-digest"
ispec "github.com/opencontainers/image-spec/specs-go/v1" // nolint: goimports
// nolint: goimports
ispec "github.com/opencontainers/image-spec/specs-go/v1"
// nolint:golint,stylecheck,revive
. "github.com/smartystreets/goconvey/convey"
"github.com/smartystreets/goconvey/convey/reporting"
@@ -37,7 +39,7 @@ func CheckWorkflows(t *testing.T, config *compliance.Config) {
defer outputJSONExit()
}
baseURL := fmt.Sprintf("http://%s:%s", config.Address, config.Port)
baseURL := fmt.Sprintf("http://%s", net.JoinHostPort(config.Address, config.Port))
storageInfo := config.StorageInfo
+3 -1
View File
@@ -116,7 +116,9 @@ func (ms *metricServer) ReceiveMetrics() interface{} {
return <-ms.cacheChan
}
func (ms *metricServer) IsEnabled() (b bool) {
func (ms *metricServer) IsEnabled() bool {
b := false
// send a bool value on the request channel to avoid data race
ms.reqChan <- b