From d3863975b695627c883259d3b972cbe97f0f1107 Mon Sep 17 00:00:00 2001 From: davidnewhall2 Date: Mon, 30 Dec 2019 16:04:25 -0800 Subject: [PATCH] fix lint --- core/unifi/site.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/unifi/site.go b/core/unifi/site.go index 20018b03..03207ae1 100644 --- a/core/unifi/site.go +++ b/core/unifi/site.go @@ -5,6 +5,9 @@ import ( "strings" ) +// Satisfy gomnd +const oneItem = 1 + // GetSites returns a list of configured sites on the UniFi controller. func (u *Unifi) GetSites() (Sites, error) { var response struct { @@ -48,9 +51,9 @@ func (u *Unifi) GetSiteDPI(sites Sites) ([]*DPITable, error) { return nil, err } - if l := len(response.Data); l > 1 { + if l := len(response.Data); l > oneItem { return nil, fmt.Errorf("dpi data table contains more than 1 item; please open a bug report") - } else if l != 1 { + } else if l != oneItem { continue }