Skip to content

Commit

Permalink
Removed useless type assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
hknutzen committed Mar 5, 2024
1 parent 8bca8b2 commit a9998f3
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions go/pkg/pass1/check-service-owner.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,17 +271,13 @@ func (c *spoc) checkServiceOwner(sRules *serviceRules) {
if !hasMulti {
c.uselessSvcAttr("multi_owner", svc)
} else if info.sameObjects {

// Check if attribute 'multi_owner' could be avoided,
// if objects of user and objects of rules are swapped.
var userOwner *owner
USERS:
for _, users := range info.users {
for _, user := range users {
var o *owner
if obj, ok := user.(srvObj); ok {
o = obj.getOwner()
}
o := user.getOwner()
if o == nil {
userOwner = nil
break USERS
Expand Down

0 comments on commit a9998f3

Please sign in to comment.