mirror of
https://github.com/krau/SaveAny-Bot.git
synced 2026-05-31 13:11:29 +08:00
refactor: rule package
This commit is contained in:
17
pkg/rule/enum.go
Normal file
17
pkg/rule/enum.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package rule
|
||||
|
||||
type RuleType string
|
||||
|
||||
const (
|
||||
FileNameRegex RuleType = "FILENAME-REGEX"
|
||||
MessageRegex RuleType = "MESSAGE-REGEX"
|
||||
IsAlbum RuleType = "IS-ALBUM"
|
||||
)
|
||||
|
||||
func (r RuleType) String() string {
|
||||
return string(r)
|
||||
}
|
||||
|
||||
func Values() []RuleType {
|
||||
return []RuleType{FileNameRegex, MessageRegex, IsAlbum}
|
||||
}
|
||||
Reference in New Issue
Block a user