Skip to content

Commit

Permalink
Remove usused Kind() function
Browse files Browse the repository at this point in the history
The Kind() exported function is unused in our code; moreover, the function cannot be accurate because in the case of darwin, applehv and libkrun use the same config in the struct and therefore, we cannot identify the provider via that method.

Signed-off-by: Brent Baude <[email protected]>
  • Loading branch information
baude committed Jan 27, 2025
1 parent 3b6c766 commit f11dde7
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions pkg/machine/vmconfigs/machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,24 +303,6 @@ func (mc *MachineConfig) LogFile() (*define.VMFile, error) {
return rtDir.AppendToNewVMFile(mc.Name+".log", nil)
}

func (mc *MachineConfig) Kind() (define.VMType, error) {
// Not super in love with this approach
if mc.QEMUHypervisor != nil {
return define.QemuVirt, nil
}
if mc.AppleHypervisor != nil {
return define.AppleHvVirt, nil
}
if mc.HyperVHypervisor != nil {
return define.HyperVVirt, nil
}
if mc.WSLHypervisor != nil {
return define.WSLVirt, nil
}

return define.UnknownVirt, nil
}

func (mc *MachineConfig) IsFirstBoot() (bool, error) {
never, err := time.Parse(time.RFC3339, "0001-01-01T00:00:00Z")
if err != nil {
Expand Down

0 comments on commit f11dde7

Please sign in to comment.