resources: Fix golint issues

Including a trick to get the golinter to allow our compact code!
This commit is contained in:
James Shubin
2017-06-08 04:13:41 -04:00
parent 6b489f71a1
commit a8bbb22fe8
8 changed files with 102 additions and 101 deletions

View File

@@ -533,7 +533,7 @@ func (obj *BaseRes) Compare(res Res) bool {
// if resources are grouped, are the groups the same?
if i, j := obj.GetGroup(), res.GetGroup(); len(i) != len(j) {
return false
} else {
} else if len(i) > 0 { // trick the golinter
ix, jx := Sort(i), Sort(j)
for k := range ix {
if !ix[k].Compare(jx[k]) { // compare sub resources