Unverified Commit 63fed3b5 authored by Seth Hoenig's avatar Seth Hoenig Committed by GitHub
Browse files

Merge pull request #13194 from hashicorp/update-golangci-lint

build: update golangci-lint to v1.46.2
No related merge requests found
Showing with 5 additions and 14 deletions
+5 -14
......@@ -143,7 +143,7 @@ deps: ## Install build and development dependencies
lint-deps: ## Install linter dependencies
## Keep versions in sync with tools/go.mod (see https://github.com/golang/go/issues/30515)
@echo "==> Updating linter dependencies..."
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.45.0
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.46.2
go install github.com/client9/misspell/cmd/misspell@v0.3.4
go install github.com/hashicorp/go-hclog/hclogvet@v0.1.4
......
......@@ -1699,9 +1699,7 @@ func (s *Server) setupNewWorkersLocked() error {
// make a copy of the s.workers array so we can safely stop those goroutines asynchronously
oldWorkers := make([]*Worker, len(s.workers))
defer s.stopOldWorkers(oldWorkers)
for i, w := range s.workers {
oldWorkers[i] = w
}
copy(oldWorkers, s.workers)
s.logger.Info(fmt.Sprintf("marking %v current schedulers for shutdown", len(oldWorkers)))
// build a clean backing array and call setupWorkersLocked like setupWorkers
......
......@@ -145,9 +145,7 @@ func copyAvailAddresses(a map[string][]NodeNetworkAddress) map[string][]NodeNetw
continue
}
c[k] = make([]NodeNetworkAddress, len(v))
for i, a := range v {
c[k][i] = a
}
copy(c[k], v)
}
return c
......
......@@ -1476,9 +1476,7 @@ func (e *ConsulExposeConfig) Copy() *ConsulExposeConfig {
return nil
}
paths := make([]ConsulExposePath, len(e.Paths))
for i := 0; i < len(e.Paths); i++ {
paths[i] = e.Paths[i]
}
copy(paths, e.Paths)
return &ConsulExposeConfig{
Paths: paths,
}
......
......@@ -3961,10 +3961,7 @@ func (a *AllocatedDeviceResource) Copy() *AllocatedDeviceResource {
// Copy the devices
na.DeviceIDs = make([]string, len(a.DeviceIDs))
for i, id := range a.DeviceIDs {
na.DeviceIDs[i] = id
}
copy(na.DeviceIDs, a.DeviceIDs)
return &na
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment