fix: reorder fields in AnubisRule struct for better alignment

This commit is contained in:
Jason Cameron
2025-06-13 16:34:43 -04:00
parent 5ee537bc22
commit 5aa7d8e0d6
2 changed files with 4 additions and 3 deletions

View File

@@ -36,12 +36,13 @@ type RobotsRule struct {
IsBlacklist bool // true if this is a specifically denied user agent
}
//betteralign:ignore, we want name to be the first field
type AnubisRule struct {
Name string `yaml:"name" json:"name"`
Action string `yaml:"action" json:"action"`
Expression map[string]interface{} `yaml:"expression,omitempty" json:"expression,omitempty"`
Challenge *config.ChallengeRules `yaml:"challenge,omitempty" json:"challenge,omitempty"`
Weight *config.Weight `yaml:"weight,omitempty" json:"weight,omitempty"`
Name string `yaml:"name" json:"name"`
Action string `yaml:"action" json:"action"`
}
func main() {

View File

@@ -5,4 +5,4 @@
- name: robots-txt-policy-disallow-2
action: CHALLENGE
expression:
single: path.startsWith("/private")
single: path.startsWith("/private")