Skip to content

Commit

Permalink
filtering: fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
EugeneOne1 committed Dec 20, 2022
1 parent 1ea8d45 commit 2ecfc18
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions internal/filtering/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -446,8 +446,8 @@ func isPrintableText(data string) (ok bool) {
return true
}

// scanLinesWithBreak is essentially a [bufio.ScanLines] which splits the data
// into pieces with trailing line breaks.
// scanLinesWithBreak is essentially a [bufio.ScanLines] which keeps trailing
// line breaks.
func scanLinesWithBreak(data []byte, atEOF bool) (advance int, token []byte, err error) {
if atEOF && len(data) == 0 {
return 0, nil, nil
Expand All @@ -465,9 +465,9 @@ func scanLinesWithBreak(data []byte, atEOF bool) (advance int, token []byte, err
return 0, nil, nil
}

// processUpdate copies filter's content from src to dst and returns the number
// of rules, name, number of bytes written, checksum, and title of the parsed
// list. dst must not be nil.
// parseFilter copies filter's content from src to dst and returns the number of
// rules, name, number of bytes written, checksum, and title of the parsed list.
// dst must not be nil.
func (d *DNSFilter) parseFilter(
src io.Reader,
dst io.Writer,
Expand Down Expand Up @@ -508,7 +508,6 @@ func (d *DNSFilter) parseFilter(

// parseFilterLine returns true if the passed line is a rule. line is
// considered a rule if it's not a comment and contains no title.
// singleHTMLCheck must be non-nil.
func (d *DNSFilter) parseFilterLine(
line string,
lookForTitle bool,
Expand Down
2 changes: 1 addition & 1 deletion internal/filtering/filter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"github.com/stretchr/testify/require"
)

// serveHTTPLocally starts a new HTTP server, that serves it's index with h. It
// serveHTTPLocally starts a new HTTP server, that handles its index with h. It
// also gracefully closes the listener when the test under t finishes.
func serveHTTPLocally(t *testing.T, h http.Handler) (urlStr string) {
t.Helper()
Expand Down

0 comments on commit 2ecfc18

Please sign in to comment.