You've already forked filebrowser
mirror of
https://github.com/filebrowser/filebrowser.git
synced 2025-11-26 14:25:26 +08:00
feat: cleanup cli
License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com>
This commit is contained in:
12
cmd/rules.go
12
cmd/rules.go
@@ -83,9 +83,17 @@ func printRules(rules []rules.Rule, id interface{}) {
|
||||
for id, rule := range rules {
|
||||
fmt.Printf("(%d) ", id)
|
||||
if rule.Regex {
|
||||
fmt.Printf("Allow: %t\tRegex: %s\n", rule.Allow, rule.Regexp.Raw)
|
||||
if rule.Allow {
|
||||
fmt.Printf("Allow Regex: \t%s\n", rule.Regexp.Raw)
|
||||
} else {
|
||||
fmt.Printf("Disallow Regex: \t%s\n", rule.Regexp.Raw)
|
||||
}
|
||||
} else {
|
||||
fmt.Printf("Allow: %t\tPath: %s\n", rule.Allow, rule.Path)
|
||||
if rule.Allow {
|
||||
fmt.Printf("Allow Path: \t%s\n", rule.Path)
|
||||
} else {
|
||||
fmt.Printf("Disallow Path: \t%s\n", rule.Path)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user