From da5c051d73ffd8bca7d5197af1934c8c51dbcb93 Mon Sep 17 00:00:00 2001 From: Kristoffer Dalby Date: Tue, 17 Jan 2023 17:55:59 +0100 Subject: [PATCH] Lint fix Signed-off-by: Kristoffer Dalby --- db.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/db.go b/db.go index 41949525..f4aae335 100644 --- a/db.go +++ b/db.go @@ -110,7 +110,10 @@ func (h *Headscale) initDB() error { continue } - err = db.Preload("Machine").Where("machine_id = ? AND prefix = ?", machine.ID, IPPrefix(prefix)).First(&Route{}).Error + err = db.Preload("Machine"). + Where("machine_id = ? AND prefix = ?", machine.ID, IPPrefix(prefix)). + First(&Route{}). + Error if err == nil { log.Info(). Str("enabled_route", prefix.String()).