mirror of
https://github.com/project-zot/zot.git
synced 2026-06-15 20:07:55 +08:00
update linter version to 1.46.2
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
This commit is contained in:
committed by
Ramkumar Chinchani
parent
32afe712d6
commit
287ac05ddc
+2
-1
@@ -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")
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user