From a968b236366fe383c0ee47b592191fe47a03f0d1 Mon Sep 17 00:00:00 2001 From: sophia Date: Wed, 14 Jul 2021 17:05:34 -0500 Subject: [PATCH] Return a box from a machine --- internal/core/machine.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/internal/core/machine.go b/internal/core/machine.go index 2c6665a8f..46fc9a713 100644 --- a/internal/core/machine.go +++ b/internal/core/machine.go @@ -34,10 +34,9 @@ func (m *Machine) SetID(value string) (err error) { return m.SaveMachine() } -// Box implements core.Machine -func (m *Machine) Box() (b core.Box, err error) { - // TODO - return +func (m *Machine) Box() (b *core.Box, err error) { + var result core.Box + return &result, mapstructure.Decode(m.machine.Box, &result) } // Guest implements core.Machine