refractor(aa): ensure methods order in rules definitions.

This commit is contained in:
Alexandre Pujol 2024-06-25 19:56:36 +01:00
parent 272072d2a5
commit 880f0ef37e
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
19 changed files with 310 additions and 310 deletions

View file

@ -120,6 +120,18 @@ func newMountFromLog(log map[string]string) Rule {
}
}
func (r *Mount) Kind() Kind {
return MOUNT
}
func (r *Mount) Constraint() constraint {
return blockKind
}
func (r *Mount) String() string {
return renderTemplate(r.Kind(), r)
}
func (r *Mount) Validate() error {
if err := r.MountConditions.Validate(); err != nil {
return fmt.Errorf("%s: %w", r, err)
@ -156,18 +168,6 @@ func (r *Mount) Merge(other Rule) bool {
return false
}
func (r *Mount) String() string {
return renderTemplate(r.Kind(), r)
}
func (r *Mount) Constraint() constraint {
return blockKind
}
func (r *Mount) Kind() Kind {
return MOUNT
}
type Umount struct {
Base
Qualifier
@ -202,6 +202,18 @@ func newUmountFromLog(log map[string]string) Rule {
}
}
func (r *Umount) Kind() Kind {
return UMOUNT
}
func (r *Umount) Constraint() constraint {
return blockKind
}
func (r *Umount) String() string {
return renderTemplate(r.Kind(), r)
}
func (r *Umount) Validate() error {
if err := r.MountConditions.Validate(); err != nil {
return fmt.Errorf("%s: %w", r, err)
@ -234,18 +246,6 @@ func (r *Umount) Merge(other Rule) bool {
return false
}
func (r *Umount) String() string {
return renderTemplate(r.Kind(), r)
}
func (r *Umount) Constraint() constraint {
return blockKind
}
func (r *Umount) Kind() Kind {
return UMOUNT
}
type Remount struct {
Base
Qualifier
@ -281,6 +281,18 @@ func newRemountFromLog(log map[string]string) Rule {
}
}
func (r *Remount) Kind() Kind {
return REMOUNT
}
func (r *Remount) Constraint() constraint {
return blockKind
}
func (r *Remount) String() string {
return renderTemplate(r.Kind(), r)
}
func (r *Remount) Validate() error {
if err := r.MountConditions.Validate(); err != nil {
return fmt.Errorf("%s: %w", r, err)
@ -312,15 +324,3 @@ func (r *Remount) Merge(other Rule) bool {
}
return false
}
func (r *Remount) String() string {
return renderTemplate(r.Kind(), r)
}
func (r *Remount) Constraint() constraint {
return blockKind
}
func (r *Remount) Kind() Kind {
return REMOUNT
}