From ebd27b46afabb3f160151e61c96b868e5cff3b2a Mon Sep 17 00:00:00 2001 From: Kristoffer Dalby Date: Mon, 23 Aug 2021 07:35:44 +0100 Subject: [PATCH] Add comment to updatemachine --- machine.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/machine.go b/machine.go index 57c48ba8..4cdadd98 100644 --- a/machine.go +++ b/machine.go @@ -213,6 +213,8 @@ func (h *Headscale) GetMachineByID(id uint64) (*Machine, error) { return &m, nil } +// UpdateMachine takes a Machine struct pointer (typically already loaded from database +// and updates it with the latest data from the database. func (h *Headscale) UpdateMachine(m *Machine) error { if result := h.db.Find(m).First(&m); result.Error != nil { return result.Error