Skip to content

Commit

Permalink
go mod tidy and go fmt
Browse files Browse the repository at this point in the history
Signed-off-by: Serge Hallyn <[email protected]>
  • Loading branch information
hallyn committed Jan 26, 2023
1 parent e704ed8 commit 55ecabc
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 19 deletions.
8 changes: 4 additions & 4 deletions console.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
)

var consoleCmd = cli.Command{
Name: "console",
Usage: "open serial console to a VM",
Name: "console",
Usage: "open serial console to a VM",
Action: doConsole,
}

Expand All @@ -33,8 +33,8 @@ func doConsole(ctx *cli.Context) error {
}

var guiCmd = cli.Command{
Name: "gui",
Usage: "open graphical connection to a VM",
Name: "gui",
Usage: "open graphical connection to a VM",
Action: doGui,
}

Expand Down
4 changes: 2 additions & 2 deletions edit.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (
)

var editCmd = cli.Command{
Name: "edit",
Usage: "edit a machine definition",
Name: "edit",
Usage: "edit a machine definition",
Action: doEdit,
}

Expand Down
3 changes: 0 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ require (
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/pborman/uuid v1.2.1 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/sevlyar/go-daemon v0.1.6 // indirect
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
golang.org/x/crypto v0.0.0-20211117183948-ae814b36b871 // indirect
golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9 // indirect
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
gopkg.in/robfig/cron.v2 v2.0.0-20150107220207-be2e0b0deed5 // indirect
)
Expand Down
4 changes: 2 additions & 2 deletions list.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
)

var listCmd = cli.Command{
Name: "list",
Usage: "list defined machines",
Name: "list",
Usage: "list defined machines",
Action: doList,
}

Expand Down
2 changes: 0 additions & 2 deletions qemu.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"path"
"strconv"
"strings"

)

type QemuKvmContext struct {
Expand Down Expand Up @@ -121,4 +120,3 @@ func hugetlbfsFreePages() (int, error) {
}
return 0, fmt.Errorf("Did not find HugePages_Free entry in /proc/meminfo")
}

1 change: 0 additions & 1 deletion swtpm.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,4 +246,3 @@ func (s *SwTPM) Stop() error {
}
return nil
}

6 changes: 3 additions & 3 deletions utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,9 @@ func EnsureDir(dir string) error {

// CopyFileBits - copy file content from a to b
// differs from CopyFile in:
// - does not do permissions - new files created with 0644
// - if src is a symlink, copies content, not link.
// - does not invoke sh.
// - does not do permissions - new files created with 0644
// - if src is a symlink, copies content, not link.
// - does not invoke sh.
func CopyFileBits(src, dest string) error {
in, err := os.Open(src)
if err != nil {
Expand Down
1 change: 0 additions & 1 deletion vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,6 @@ var QemuTypeIndex map[string]int
// -object iothread,id=iothread2
// -drive id=drv1
// -device scsi-hd,drive=drv1,iothread=iothread2
//
func getNextQemuIndex(qtype string) int {
currentIndex := 0
ok := false
Expand Down
1 change: 0 additions & 1 deletion vmdisk.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,4 +225,3 @@ func (q *QemuDisk) args(attachIndex int, bootIndex int) []string {
"-device", strings.Join(devopts, ","),
}
}

0 comments on commit 55ecabc

Please sign in to comment.