Skip to content

Commit

Permalink
Run gofmt
Browse files Browse the repository at this point in the history
This should fix golangci-lint failures in github actions
  • Loading branch information
cfergeau committed Aug 19, 2023
1 parent bc2c1dd commit 0c00dc3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pkg/config/virtio.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ func VirtioGPUNew() (VirtioDevice, error) {

func (dev *VirtioGPU) validate() error {
if dev.Height < 1 || dev.Width < 1 {
return fmt.Errorf("Invalid dimensions for virtio-gpu device resolution: %dx%d", dev.Width,dev.Height)
return fmt.Errorf("Invalid dimensions for virtio-gpu device resolution: %dx%d", dev.Width, dev.Height)
}

return nil
Expand All @@ -287,7 +287,7 @@ func (dev *VirtioGPU) ToCmdLine() ([]string, error) {
return nil, err
}

return []string{"--device", fmt.Sprintf("virtio-gpu,width=%d,height=%d", dev.Width,dev.Height )}, nil
return []string{"--device", fmt.Sprintf("virtio-gpu,width=%d,height=%d", dev.Width, dev.Height)}, nil
}

func (dev *VirtioGPU) FromOptions(options []option) error {
Expand Down
6 changes: 3 additions & 3 deletions pkg/config/virtio_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ var virtioDevTests = map[string]virtioDevTest{
newDev: VirtioGPUNew,
expectedDev: &VirtioGPU{
false,
VirtioGPUResolution{Width:800,Height:600},
VirtioGPUResolution{Width: 800, Height: 600},
},
expectedCmdLine: []string{"--device", "virtio-gpu,width=800,height=600"},
},
Expand All @@ -168,12 +168,12 @@ var virtioDevTests = map[string]virtioDevTest{
if err != nil {
return nil, err
}
dev.(*VirtioGPU).VirtioGPUResolution = VirtioGPUResolution{Width:1920,Height:1080}
dev.(*VirtioGPU).VirtioGPUResolution = VirtioGPUResolution{Width: 1920, Height: 1080}
return dev, nil
},
expectedDev: &VirtioGPU{
false,
VirtioGPUResolution{Width:1920,Height:1080},
VirtioGPUResolution{Width: 1920, Height: 1080},
},
expectedCmdLine: []string{"--device", "virtio-gpu,width=1920,height=1080"},
},
Expand Down

0 comments on commit 0c00dc3

Please sign in to comment.