chore: gofix

Signed-off-by: Jason Cameron <jason.cameron@stanwith.me>
This commit is contained in:
Jason Cameron
2026-02-18 12:49:58 -05:00
parent 35b5e78a0d
commit 3510abb3bd
22 changed files with 59 additions and 78 deletions
+3 -5
View File
@@ -10,6 +10,7 @@ import (
"net/http"
"os"
"regexp"
"slices"
"strings"
"github.com/TecharoHQ/anubis/lib/config"
@@ -210,11 +211,8 @@ func parseRobotsTxt(input io.Reader) ([]RobotsRule, error) {
// Mark blacklisted user agents (those with "Disallow: /")
for i := range rules {
for _, disallow := range rules[i].Disallows {
if disallow == "/" {
rules[i].IsBlacklist = true
break
}
if slices.Contains(rules[i].Disallows, "/") {
rules[i].IsBlacklist = true
}
}