MCPcopy
hub / github.com/PuerkitoBio/goquery / loadString

Function loadString

type_test.go:125–131  ·  view source on GitHub ↗
(t *testing.T, doc string)

Source from the content-addressed store, hash-verified

123}
124
125func loadString(t *testing.T, doc string) *Document {
126 d, err := NewDocumentFromReader(strings.NewReader(doc))
127 if err != nil {
128 t.Error("Failed to parse test document")
129 }
130 return d
131}
132
133func TestNewDocument(t *testing.T) {
134 if f, e := os.Open("./testdata/page.html"); e != nil {

Callers 8

TestAfterHtmlContextFunction · 0.85
TestAppendHtmlContextFunction · 0.85
TestBeforeHtmlContextFunction · 0.85
TestPrependHtmlContextFunction · 0.85
TestSetHtmlContextFunction · 0.85

Calls 1

NewDocumentFromReaderFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…