mirror of
https://github.com/TecharoHQ/anubis.git
synced 2026-04-18 14:24:56 +00:00
fix: reorder fields in AnubisRule struct for better alignment
This commit is contained in:
@@ -36,12 +36,13 @@ type RobotsRule struct {
|
|||||||
IsBlacklist bool // true if this is a specifically denied user agent
|
IsBlacklist bool // true if this is a specifically denied user agent
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//betteralign:ignore, we want name to be the first field
|
||||||
type AnubisRule struct {
|
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"`
|
Expression map[string]interface{} `yaml:"expression,omitempty" json:"expression,omitempty"`
|
||||||
Challenge *config.ChallengeRules `yaml:"challenge,omitempty" json:"challenge,omitempty"`
|
Challenge *config.ChallengeRules `yaml:"challenge,omitempty" json:"challenge,omitempty"`
|
||||||
Weight *config.Weight `yaml:"weight,omitempty" json:"weight,omitempty"`
|
Weight *config.Weight `yaml:"weight,omitempty" json:"weight,omitempty"`
|
||||||
Name string `yaml:"name" json:"name"`
|
|
||||||
Action string `yaml:"action" json:"action"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|||||||
Reference in New Issue
Block a user