From f11dde76e5fc68dfe29bfaecec6caf6b899b4b5d Mon Sep 17 00:00:00 2001 From: Brent Baude Date: Mon, 27 Jan 2025 12:41:48 -0600 Subject: [PATCH] Remove usused Kind() function 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 --- pkg/machine/vmconfigs/machine.go | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/pkg/machine/vmconfigs/machine.go b/pkg/machine/vmconfigs/machine.go index 8627a0b19e..256c20ae4a 100644 --- a/pkg/machine/vmconfigs/machine.go +++ b/pkg/machine/vmconfigs/machine.go @@ -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 {