v0.4.0 — the refactor 🧹
go-disc-cuer is a CLI tool and reusable Go package to generate CUE files from audio CDs, with metadata enrichment from GNUDB and MusicBrainz.
This release delivers the internals cleanup promised in v0.3.0: a new injectable Generator API, a testable disc seam, full CI, and a proper release pipeline — with no change to the CLI surface.
✨ Highlights
- New
GeneratorAPI —cue.New(cfg, ...Option).Generate(Options)replaces the old generate variants. Dependencies (drive, metadata source) are now injected per-Generatorinstead of through package-level vars, so the whole flow is testable without hardware or network. - Disc access abstracted behind the
utils.Discinterface, enabling end-to-end tests that driveGeneratefrom a canned TOC (no drive required). - Stampable version —
config.AppVersionis now a var (default"dev") that builds can set via-ldflags -X; library consumers keep overriding it throughNewConfig.
🐛 Fixes
- gnudb: rejoin
TTITLElines wrapped across multiple lines (#9). - musicbrainz: guard
convertReleaseToDiscInfoagainst empty data. - log: trace request URLs and redact the email-bearing
hello=param from GNUDB URLs before logging.
🏗️ Tooling
- Makefile (
deps/build/dist/test/lint/ …) with a git-stamped version. - GitHub Actions: CI running build,
go test -raceandgolangci-linton every push and PR, plus a release workflow that publishes thelinux/amd64artifact on tag push.
🎛️ CLI flags (unchanged)
--overwrite— regenerate the CUE file even if it already exists--musicbrainz <release_id>— force a specific MusicBrainz release for metadata--disc-id <disc_id>— supply a custom disc ID (requires--musicbrainz)--device <device>— override the disc drive (default/dev/sr0)
📦 Install
git clone https://github.com/b0bbywan/go-disc-cuer.git
cd go-disc-cuer
# Debian/Ubuntu
sudo apt install libdiscid0 libdiscid-dev
# Fedora
sudo dnf install libdiscid libdiscid-devel
make build # or: go build -o disc-cuer .A prebuilt disc-cuer-linux-amd64 binary is attached below.
Full changelog: v0.3.0...v0.4.0