Skip to content

Commit

Permalink
Fix: build and vet errors
Browse files Browse the repository at this point in the history
  • Loading branch information
yunginnanet committed Jun 21, 2024
1 parent cc7020f commit 3c2059a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion cmd/HellPot/HellPot.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ func main() {
if runningConfig == nil {
if runningConfig, err = config.Setup(nil); err != nil || runningConfig == nil {
panic("failed to setup default config...\n" + err.Error())
return // unreachable, but the linter doesn't seem to realize that
}
}

Expand Down
10 changes: 5 additions & 5 deletions internal/config/models_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@ func TestCompileRules(t *testing.T) {
if len(rules.UseragentDisallowStrings) != 3 {
t.Error("expected 3 got", len(rules.UseragentDisallowStrings))
}
if !rules.MatchUseragent("yeeterson") {
if !rules.MatchUseragent([]byte("yeeterson")) {
t.Error("expected true got false")
}
if !rules.MatchUseragent("mc") {
if !rules.MatchUseragent([]byte("mc")) {
t.Error("expected true got false")
}
if !rules.MatchUseragent("yooterson") {
if !rules.MatchUseragent([]byte("yooterson")) {
t.Error("expected true got false")
}
if !rules.MatchUseragent("gooters%n") {
if !rules.MatchUseragent([]byte("gooters%n")) {
t.Error("expected true got false")
}
if rules.MatchUseragent("yootersongooterson") {
if rules.MatchUseragent([]byte("yootersongooterson")) {
t.Error("expected false got true")
}
}

0 comments on commit 3c2059a

Please sign in to comment.