Is there a way to use golang.org/x/net/html in my plugin for HTML parsing

For a plugin I have a need to parse HTML. For this, I want to make use of the golang[.]org/x/net/html package. As I can't seem to import it directly (nor via net/html), I installed it in the vendor section of my plugin.

In particular, I would like to add nonces to style and script tags as well as create inline style tags containing attribute based styles for a third party service's returned HTML.

I've got everything working in a stand alone Go program, but it goes wrong when using the code in a plugin.

Unfortunately, when trying to run traefik, I get the following message:
error: plugins-local\src\myPlugin\vendor\golang.org\x\net\html\parse.go:688:46: cannot use type func(*html.parser) bool as type func(*unsafe2.dummy) bool"

How can I resolve this? Is there an alternative?

Tried with Traefik 2.9.6 and 2.10.3.

Does this help (doc)?

Plugin dependencies must be vendored for each plugin. Vendored packages should be included in the plugin's GitHub repository. (Go modules are not supported.)

Alternatively, check how existing Traefik plugins deal with it.

Thanks for your response. Although I am quite new to Go, as far as I understand I have my dependency vendored; it's about having my own copy of the 3rd party packages I am using, correct? I've got it setup similarly to, e.g., GitHub - traefik/plugin-simplecache: Simple cache plugin middleware caches responses on disk.

As it seems, Yaegi does seem to be able to find the 3rd party code, yet has issues with a construct in that code.