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))
})
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.