Skip to content

Commit 86aa304

Browse files
committed
Remove LoadURLWithLineNumbers method
1 parent 4558cdd commit 86aa304

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

parse.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -765,17 +765,3 @@ func (p *lineNumberAnnotator) findProcessingInstructionPosition(target string) i
765765
}
766766
return 1
767767
}
768-
769-
// LoadURLWithLineNumbers loads the XML document from the specified URL with line number annotations.
770-
func LoadURLWithLineNumbers(url string) (*Node, error) {
771-
resp, err := http.Get(url)
772-
if err != nil {
773-
return nil, err
774-
}
775-
defer resp.Body.Close()
776-
777-
if xmlMIMERegex.MatchString(resp.Header.Get("Content-Type")) {
778-
return ParseWithOptions(resp.Body, ParserOptions{WithLineNumbers: true})
779-
}
780-
return nil, fmt.Errorf("invalid XML document(%s)", resp.Header.Get("Content-Type"))
781-
}

0 commit comments

Comments
 (0)