From e33c1243cc93316f75a361b1a74f02bd9042ebec Mon Sep 17 00:00:00 2001 From: Alexandre Pujol Date: Tue, 28 May 2024 18:22:14 +0100 Subject: [PATCH] chore(aa): cleanup. --- pkg/aa/all.go | 6 +++--- pkg/aa/file.go | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pkg/aa/all.go b/pkg/aa/all.go index 608bfd9a..ba23aa10 100644 --- a/pkg/aa/all.go +++ b/pkg/aa/all.go @@ -5,7 +5,7 @@ package aa const ( - tokALL = "all" + ALL Kind = "all" ) type All struct { @@ -32,6 +32,6 @@ func (r *All) Constraint() constraint { return blockKind } -func (r *All) Kind() string { - return tokALL +func (r *All) Kind() Kind { + return ALL } diff --git a/pkg/aa/file.go b/pkg/aa/file.go index 07ab71d8..dd828951 100644 --- a/pkg/aa/file.go +++ b/pkg/aa/file.go @@ -95,15 +95,15 @@ func (r *File) Less(other any) bool { if r.Path != o.Path { return r.Path < o.Path } + if o.Owner != r.Owner { + return r.Owner + } if len(r.Access) != len(o.Access) { return len(r.Access) < len(o.Access) } if r.Target != o.Target { return r.Target < o.Target } - if o.Owner != r.Owner { - return r.Owner - } return r.Qualifier.Less(o.Qualifier) } @@ -153,12 +153,12 @@ func (r *Link) Less(other any) bool { if r.Path != o.Path { return r.Path < o.Path } - if r.Target != o.Target { - return r.Target < o.Target - } if o.Owner != r.Owner { return r.Owner } + if r.Target != o.Target { + return r.Target < o.Target + } if r.Subset != o.Subset { return r.Subset }