func (d *Document) Html() (string, error) {
	d.RLock()
	defer d.RUnlock()
	html, err := d.html.Html()
	if err != nil {
		return "", err
	}
	return html, nil
}
Html is returning the final HTML output.
package fragments
import (
	"sync"
	"github.com/PuerkitoBio/goquery"
	"github.com/gofiber/fiber/v2"
	"golang.org/x/net/html"
)
type Document struct {
	doc        *goquery.Document
	html       *HtmlFragment
	statusCode int
	sync.RWMutex
}
func NewDocument(root *html.Node) (*Document, error) {
	d := new(Document)
	d.statusCode = fiber.StatusOK
	html, err := NewHtmlFragment(root)
	if err != nil {
		return nil, err
	}
	d.html = html
	return d, nil
}