From 8d795603df011feed0d85c89174294f5bc04ec11 Mon Sep 17 00:00:00 2001 From: Patrik Lundin Date: Mon, 5 Mar 2018 21:24:08 +0100 Subject: [PATCH] object_manager.go: Fix internal golint suggestions (#45) Fixes: === object_manager.go:45:41: method parameter cloudApiOwned should be cloudAPIOwned object_manager.go:151:9: should omit 2nd value from range; this loop is equivalent to `for k := range ...` === --- object_manager.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/object_manager.go b/object_manager.go index 6f67c214..0584f656 100644 --- a/object_manager.go +++ b/object_manager.go @@ -42,9 +42,9 @@ func NewObjectManager(connector IBConnector, cmpType string, tenantID string) *O return objMgr } -func (objMgr *ObjectManager) getBasicEA(cloudApiOwned Bool) EA { +func (objMgr *ObjectManager) getBasicEA(cloudAPIOwned Bool) EA { ea := make(EA) - ea["Cloud API Owned"] = cloudApiOwned + ea["Cloud API Owned"] = cloudAPIOwned ea["CMP Type"] = objMgr.cmpType ea["Tenant ID"] = objMgr.tenantID return ea @@ -148,7 +148,7 @@ func (objMgr *ObjectManager) UpdateNetworkViewEA(ref string, addEA EA, removeEA res.Ea[k] = v } - for k, _ := range removeEA { + for k := range removeEA { _, ok := res.Ea[k] if ok { delete(res.Ea, k)