Skip to content

Commit 41696ba

Browse files
committed
fix: address PR review feedback
- Add Deprecated comment to OutputFilterErrorPage field - Coerce PageType to string for safe type assertion
1 parent 0a42f31 commit 41696ba

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

runner/options.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,8 @@ type Options struct {
201201
OutputMatchStatusCode string
202202
OutputMatchContentLength string
203203
OutputFilterStatusCode string
204-
OutputFilterErrorPage bool
204+
// Deprecated: use OutputFilterPageType with "error" instead.
205+
OutputFilterErrorPage bool
205206
OutputFilterPageType goflags.StringSlice
206207
FilterOutDuplicates bool
207208
OutputFilterContentLength string

runner/runner.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ func (r *Runner) classifyPage(headlessBody, body string, pHash uint64) map[strin
667667
if err != nil {
668668
return kb
669669
}
670-
kb["PageType"] = result.Type
670+
kb["PageType"] = fmt.Sprint(result.Type)
671671
if len(result.Forms) > 0 {
672672
kb["Forms"] = result.Forms
673673
}

0 commit comments

Comments
 (0)