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/bhyve/bhyve.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'vm/bhyve') diff --git a/vm/bhyve/bhyve.go b/vm/bhyve/bhyve.go index e645ca191..57515ba22 100644 --- a/vm/bhyve/bhyve.go +++ b/vm/bhyve/bhyve.go @@ -276,7 +276,7 @@ func (inst *instance) Boot() error { return nil } -func (inst *instance) Close() { +func (inst *instance) Close() error { if inst.consolew != nil { inst.consolew.Close() } @@ -294,6 +294,7 @@ func (inst *instance) Close() { osutil.RunCmd(time.Minute, "", "ifconfig", inst.tapdev, "destroy") inst.tapdev = "" } + return nil } func (inst *instance) Forward(port int) (string, error) { -- cgit mrf-deployment