Package xz implements XZ decompression natively in Go.
Documentation at https://pkg.go.dev/github.com/therootcompany/xz.
Download and install with go get github.com/xi2/xz.
If you need compression as well as decompression, you might want to look at https://github.com/ulikunitz/xz.
This was originally released into the public domain by the AUTHORS.
Here it is licensed more explicitly as Creative Commons CC0 1.0 Universal (CC0-1.0) so that it can be detected by automated tooling, and satisfy the legal requirements for vendor integration for cases in which a "public domain" statement is not sufficient.