chore: bump golangci-lint from v1.24 to v1.39

Signed-off-by: Yoan Blanc <yoan@dosimple.ch>
This commit is contained in:
Yoan Blanc
2021-04-03 09:50:23 +02:00
parent 3db2f2f9f5
commit a814f0253f
19 changed files with 28 additions and 27 deletions

View File

@@ -117,7 +117,7 @@ func (a *TestAgent) Start() *TestAgent {
if a.Name != "" {
name = a.Name + "-agent"
}
name = strings.Replace(name, "/", "_", -1)
name = strings.ReplaceAll(name, "/", "_")
d, err := ioutil.TempDir(TempDir, name)
if err != nil {
a.T.Fatalf("Error creating data dir %s: %s", filepath.Join(TempDir, name), err)

View File

@@ -159,7 +159,7 @@ func getDeployment(client *api.Deployments, dID string) (match *api.Deployment,
return d, nil, nil
}
dID = strings.Replace(dID, "-", "", -1)
dID = strings.ReplaceAll(dID, "-", "")
if len(dID) == 1 {
return nil, nil, fmt.Errorf("Identifier must contain at least two characters.")
}

View File

@@ -4,7 +4,7 @@ import (
"fmt"
"strings"
multierror "github.com/hashicorp/go-multierror"
"github.com/hashicorp/go-multierror"
"github.com/hashicorp/nomad/api"
"github.com/hashicorp/nomad/command/agent"
flaghelper "github.com/hashicorp/nomad/helper/flags"

View File

@@ -1018,7 +1018,7 @@ func TarCZF(archive string, src, target string) error {
}
// remove leading path to the src, so files are relative to the archive
path := strings.Replace(file, src, "", -1)
path := strings.ReplaceAll(file, src, "")
if target != "" {
path = filepath.Join([]string{target, path}...)
}