Go extensions are run using https://github.com/traefik/yaegi, a Go interpreter. There is a limited number of packages you can import—third-party or from the standard library.
<aside> ⚠️ Std lib packages related to file I/O, networking, etc. are disabled for security reasons. You should avoid using Generics, these are not supported by the interpreter.
</aside>
Make sure to get the right version of the SDK or else your extension won’t be compatible with the latest version of Seanime.
<aside> ➡️ Seanime v2.1+ → Hibike v0.5.1
</aside>
go get github.com/5rahim/[email protected]
ZeroLog is the logging package used by Seanime. A pointer to the global logger will be passed to your constructor method.
Generally, you should limit the use of logging to only errors and important information. Avoid using fmt
or log
for logging to stdout as they will not be consistent with the rest of the logs in Seanime. Start your log messages with the name of the extension to make it easier to identify where the log came from. (e.g. my ext: blablabla...
)
go get github.com/rs/[email protected]
The following packages are available for you to install, depending on your use case.
github.com/gocolly/colly
v1.2.0github.com/PuerkitoBio/goquery
v1.9.2github.com/adrg/strutil
v0.3.1github.com/EDDYCJY/fake-useragent
v0.2.0github.com/goccy/go-json
v0.10.3