@@ -66,7 +66,7 @@ func (i *filter) Filter(data []byte) ([]byte, error) {
6666 var result []byte
6767 for _ , m := range matches {
6868 if len (m ) != 2 {
69- return nil , fmt .Errorf ("regular expressin must contain one matching group" )
69+ return nil , fmt .Errorf ("regular expression must contain one matching group" )
7070 }
7171 result = append (result , m [1 ]... )
7272 result = append (result , []byte (sep )... )
@@ -82,7 +82,7 @@ func (i *Include) GetSubstitution(p string) ([]byte, error) {
8282
8383 data , err = i .extractor .extract (data )
8484 if err != nil {
85- return nil , fmt .Errorf ("include file %q; %w" , err )
85+ return nil , fmt .Errorf ("include file %q: %w" , i . file , err )
8686 }
8787 return i .filter .Filter (data )
8888}
@@ -167,7 +167,7 @@ func (i *NumExtractor) extract(data []byte) ([]byte, error) {
167167 end = i .end
168168 }
169169 if end > len (lines ) {
170- return nil , fmt .Errorf ("end line %d after end of file (%d lines" , end , len (lines ))
170+ return nil , fmt .Errorf ("end line %d after end of file (%d lines) " , end , len (lines ))
171171 }
172172 return []byte (strings .Join (lines [start :end ], "\n " )), nil
173173}
0 commit comments