Skip to content

Commit

Permalink
Fix unused-parameter revive linting errors
Browse files Browse the repository at this point in the history
Resolve multiple linting errors flagged by recent linter
releases (golangci-lint, revive).
  • Loading branch information
atc0005 committed Feb 13, 2024
1 parent c682b0d commit e7af99e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions cmd/check_vmware_hs2ds2vms/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,9 +301,9 @@ func main() {
hostID, pairing := hostID, pairing

dsNamesForHost := func(pairings vsphere.HostDatastoresPairing) string {
names := make([]string, len(pairing.Datastores))
for i := range pairing.Datastores {
names[i] = pairing.Datastores[i].Name
names := make([]string, len(pairings.Datastores))
for i := range pairings.Datastores {
names[i] = pairings.Datastores[i].Name
}
return strings.Join(names, ", ")
}(pairing)
Expand Down
2 changes: 1 addition & 1 deletion internal/vsphere/snapshots.go
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,7 @@ func ListVMSnapshots(vm mo.VirtualMachine, w io.Writer) {

var listFunc func(mo.VirtualMachine, []types.VirtualMachineSnapshotTree, *types.ManagedObjectReference)

listFunc = func(vm mo.VirtualMachine, snapTrees []types.VirtualMachineSnapshotTree, parent *types.ManagedObjectReference) {
listFunc = func(vm mo.VirtualMachine, snapTrees []types.VirtualMachineSnapshotTree, _ *types.ManagedObjectReference) {

if len(snapTrees) == 0 {
return
Expand Down
2 changes: 1 addition & 1 deletion internal/vsphere/vms.go
Original file line number Diff line number Diff line change
Expand Up @@ -1261,7 +1261,7 @@ func getVMsCountUsingRootFolderContainerView(
logger.Printf(
"It took %v to execute getVMsCountUsingRootFolderContainerView func (and count %d VMs).\n",
time.Since(funcTimeStart),
len(allVMs),
len(*vms),
)
}(&allVMs)

Expand Down

0 comments on commit e7af99e

Please sign in to comment.