From bdca406b2cf89f029207aa8213460ec7a3267ccc Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Mon, 8 Jul 2024 12:45:31 +0200 Subject: vm: make Instance implement io.Closer It's better to follow standard interfaces. --- vm/vmm/vmm.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'vm/vmm') diff --git a/vm/vmm/vmm.go b/vm/vmm/vmm.go index 71dfd39b4..6a6242882 100644 --- a/vm/vmm/vmm.go +++ b/vm/vmm/vmm.go @@ -216,7 +216,7 @@ func (inst *instance) lookupSSHAddress() (string, error) { return fmt.Sprintf("100.64.%s.3", matches[1]), nil } -func (inst *instance) Close() { +func (inst *instance) Close() error { inst.vmctl("stop", "-f", inst.vmName) if inst.consolew != nil { inst.consolew.Close() @@ -226,6 +226,7 @@ func (inst *instance) Close() { inst.vmm.Wait() } inst.merger.Wait() + return nil } func (inst *instance) Forward(port int) (string, error) { -- cgit mrf-deployment