mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2025-02-11 12:45:10 +01:00
chore(aa): cleanup.
This commit is contained in:
parent
90087be509
commit
e33c1243cc
2 changed files with 9 additions and 9 deletions
|
@ -5,7 +5,7 @@
|
||||||
package aa
|
package aa
|
||||||
|
|
||||||
const (
|
const (
|
||||||
tokALL = "all"
|
ALL Kind = "all"
|
||||||
)
|
)
|
||||||
|
|
||||||
type All struct {
|
type All struct {
|
||||||
|
@ -32,6 +32,6 @@ func (r *All) Constraint() constraint {
|
||||||
return blockKind
|
return blockKind
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *All) Kind() string {
|
func (r *All) Kind() Kind {
|
||||||
return tokALL
|
return ALL
|
||||||
}
|
}
|
||||||
|
|
|
@ -95,15 +95,15 @@ func (r *File) Less(other any) bool {
|
||||||
if r.Path != o.Path {
|
if r.Path != o.Path {
|
||||||
return r.Path < o.Path
|
return r.Path < o.Path
|
||||||
}
|
}
|
||||||
|
if o.Owner != r.Owner {
|
||||||
|
return r.Owner
|
||||||
|
}
|
||||||
if len(r.Access) != len(o.Access) {
|
if len(r.Access) != len(o.Access) {
|
||||||
return len(r.Access) < len(o.Access)
|
return len(r.Access) < len(o.Access)
|
||||||
}
|
}
|
||||||
if r.Target != o.Target {
|
if r.Target != o.Target {
|
||||||
return r.Target < o.Target
|
return r.Target < o.Target
|
||||||
}
|
}
|
||||||
if o.Owner != r.Owner {
|
|
||||||
return r.Owner
|
|
||||||
}
|
|
||||||
return r.Qualifier.Less(o.Qualifier)
|
return r.Qualifier.Less(o.Qualifier)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -153,12 +153,12 @@ func (r *Link) Less(other any) bool {
|
||||||
if r.Path != o.Path {
|
if r.Path != o.Path {
|
||||||
return r.Path < o.Path
|
return r.Path < o.Path
|
||||||
}
|
}
|
||||||
if r.Target != o.Target {
|
|
||||||
return r.Target < o.Target
|
|
||||||
}
|
|
||||||
if o.Owner != r.Owner {
|
if o.Owner != r.Owner {
|
||||||
return r.Owner
|
return r.Owner
|
||||||
}
|
}
|
||||||
|
if r.Target != o.Target {
|
||||||
|
return r.Target < o.Target
|
||||||
|
}
|
||||||
if r.Subset != o.Subset {
|
if r.Subset != o.Subset {
|
||||||
return r.Subset
|
return r.Subset
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue