Skip to content
This repository was archived by the owner on Oct 17, 2022. It is now read-only.

Commit a4a47ac

Browse files
author
Mark Ryan
authored
Merge pull request #104 from ganeshmaharaj/metalinter-fix
Ignore errcheck errors from fmt package
2 parents 6ac47ee + 72aab9e commit a4a47ac

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

ccvm/server.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ func (s *ccvmService) processAction(action interface{}) {
505505
s.counter++
506506
a.action(ctx, s, resultCh)
507507
case cancelAction:
508-
fmt.Fprintf(os.Stderr, "Cancelling %d\n", int(a))
508+
_, _ = fmt.Fprintf(os.Stderr, "Cancelling %d\n", int(a))
509509
t, ok := s.transactions[int(a)]
510510
if ok {
511511
t.cancel()
@@ -727,7 +727,7 @@ func main() {
727727
err := startServer(signalCh)
728728
fmt.Println("Quiting")
729729
if err != nil {
730-
fmt.Fprintln(os.Stderr, err)
730+
_, _ = fmt.Fprintln(os.Stderr, err)
731731
os.Exit(1)
732732
}
733733
}

client/client.go

+11-11
Original file line numberDiff line numberDiff line change
@@ -424,16 +424,16 @@ func statusVM(ctx context.Context, details *types.InstanceDetails) {
424424

425425
w := new(tabwriter.Writer)
426426
w.Init(os.Stdout, 0, 8, 0, '\t', 0)
427-
fmt.Fprintf(w, "Name\t:\t%s\n", details.Name)
428-
fmt.Fprintf(w, "HostIP\t:\t%s\n", details.VMSpec.HostIP)
429-
fmt.Fprintf(w, "Workload\t:\t%s\n", details.Workload)
430-
fmt.Fprintf(w, "Status\t:\t%s\n", status)
431-
fmt.Fprintf(w, "SSH\t:\t%s\n", ssh)
432-
fmt.Fprintf(w, "VCPUs\t:\t%d\n", details.VMSpec.CPUs)
433-
fmt.Fprintf(w, "Mem\t:\t%d MiB\n", details.VMSpec.MemMiB)
434-
fmt.Fprintf(w, "Disk\t:\t%d GiB\n", details.VMSpec.DiskGiB)
427+
_, _ = fmt.Fprintf(w, "Name\t:\t%s\n", details.Name)
428+
_, _ = fmt.Fprintf(w, "HostIP\t:\t%s\n", details.VMSpec.HostIP)
429+
_, _ = fmt.Fprintf(w, "Workload\t:\t%s\n", details.Workload)
430+
_, _ = fmt.Fprintf(w, "Status\t:\t%s\n", status)
431+
_, _ = fmt.Fprintf(w, "SSH\t:\t%s\n", ssh)
432+
_, _ = fmt.Fprintf(w, "VCPUs\t:\t%d\n", details.VMSpec.CPUs)
433+
_, _ = fmt.Fprintf(w, "Mem\t:\t%d MiB\n", details.VMSpec.MemMiB)
434+
_, _ = fmt.Fprintf(w, "Disk\t:\t%d GiB\n", details.VMSpec.DiskGiB)
435435
if details.VMSpec.Qemuport != 0 {
436-
fmt.Fprintf(w, "QEMU Debug Port\t:\t%d\n", details.VMSpec.Qemuport)
436+
_, _ = fmt.Fprintf(w, "QEMU Debug Port\t:\t%d\n", details.VMSpec.Qemuport)
437437
}
438438
_ = w.Flush()
439439
}
@@ -618,9 +618,9 @@ func Instances(ctx context.Context) error {
618618

619619
w := new(tabwriter.Writer)
620620
w.Init(os.Stdout, 0, 8, 1, '\t', 0)
621-
fmt.Fprintln(w, "Name\tHostIP\tWorkload\tVCPUs\tMem\tDisk\t")
621+
_, _ = fmt.Fprintln(w, "Name\tHostIP\tWorkload\tVCPUs\tMem\tDisk\t")
622622
for _, id := range instanceDetails {
623-
fmt.Fprintf(w, "%s\t%s\t%s\t%d\t%d MiB\t%d Gib\n",
623+
_, _ = fmt.Fprintf(w, "%s\t%s\t%s\t%d\t%d MiB\t%d Gib\n",
624624
id.Name, id.VMSpec.HostIP, id.Workload,
625625
id.VMSpec.CPUs, id.VMSpec.MemMiB, id.VMSpec.DiskGiB)
626626
}

0 commit comments

Comments
 (0)