chore(aa): cleanup.

This commit is contained in:
Alexandre Pujol 2024-05-28 18:22:14 +01:00
parent 90087be509
commit e33c1243cc
Failed to generate hash of commit
2 changed files with 9 additions and 9 deletions

View file

@ -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
} }

View file

@ -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
} }