File tree 3 files changed +16
-15
lines changed
3 files changed +16
-15
lines changed Original file line number Diff line number Diff line change 2
2
3
3
[ ![ Go Reference] ( https://pkg.go.dev/badge/github.com/wranders/coredns-filter.svg )] ( https://pkg.go.dev/github.com/wranders/coredns-filter )
4
4
[ ![ Coverage] ( https://sonarcloud.io/api/project_badges/measure?project=wranders_coredns-filter&metric=coverage )] ( https://sonarcloud.io/summary/overall?id=wranders_coredns-filter )
5
+ [ ![ Go Report Card] ( https://goreportcard.com/badge/github.com/wranders/coredns-filter )] ( https://goreportcard.com/report/github.com/wranders/coredns-filter )
5
6
6
7
* filter* - provides domain blocking functionality
7
8
Original file line number Diff line number Diff line change 1
- package filter
2
-
3
- import "fmt"
4
-
5
- type errorExpectedEOL struct {
6
- data interface {}
7
- }
8
-
9
- func (e errorExpectedEOL ) Error () string {
10
- return fmt .Sprintf ("unexpected token(s): %q; expected end of line" , e .data )
11
- }
1
+ package filter
2
+
3
+ import "fmt"
4
+
5
+ type errorExpectedEOL struct {
6
+ data interface {}
7
+ }
8
+
9
+ func (e errorExpectedEOL ) Error () string {
10
+ return fmt .Sprintf ("unexpected token(s): %q; expected end of line" , e .data )
11
+ }
Original file line number Diff line number Diff line change @@ -20,9 +20,9 @@ func GetListLoadFunc(uri string) (ListLoadFunc, error) {
20
20
return nil , fmt .Errorf ("invalid list URL %q; %w" , uri , err )
21
21
}
22
22
if len (listUrl .Scheme ) == 0 || len (listUrl .Host ) == 0 {
23
- // URL parsing ambiguity means Parse does not always return an error witn an
24
- // invalid URL. Explicitly check that the Scheme and Host are non-zero
25
- // values so that they will be usable later.
23
+ // URL parsing ambiguity means Parse does not always return an error
24
+ // with an invalid URL. Explicitly check that the Scheme and Host are
25
+ // non-zero values so that they will be usable later.
26
26
return nil , fmt .Errorf ("invalid list URL %q; scheme or host empty" , uri )
27
27
}
28
28
switch listUrl .Scheme {
@@ -58,7 +58,7 @@ func LoadHttp(path string) (io.ReadCloser, error) {
58
58
}
59
59
if resp .StatusCode != 200 {
60
60
return nil , fmt .Errorf (
61
- "an error occured fetching list %q; %s" ,
61
+ "an error occurred fetching list %q; %s" ,
62
62
path ,
63
63
resp .Status ,
64
64
)
You can’t perform that action at this time.
0 commit comments