1

Is there any possibility to retrieve document doctype with goquery?

I've tried several things, but any worked. I suppose that it is possible, because NodeName func has switch with "html.DoctypeNode" case.

That code didn't find doctype:

doc.Find("~").Each(func(_ int, item *goquery.Selection) {
    fmt.Println(goquery.NodeName(item))
})
nexequ
  • 321
  • 5
  • 16

1 Answers1

0

It doesn't seem like there is a reliable way to retrieve the doctype using either jQuery itself (in the web browser) or goquery on the backend.

maerics
  • 151,642
  • 46
  • 269
  • 291