debian-forge-composer/internal/distro
Lars Karlitski 14ebed46da distro: register distros explicitly
Automatically registering on `init()` is clever, but a bit too magical
and easy to get wrong, because every binary must include all distros
somewhere.

Flip this inside out: distros now have a `New()`, which returns
something that implements the `Distro` interface. The distro package
explicitly creates all of them.

This means that distros cannot import distro itself anymore, because go
forbids import cycles. This only affected `InvalidOutputFormatError`.
Return a generic error for now.
2019-11-29 00:46:05 +01:00
..
fedora30 distro: register distros explicitly 2019-11-29 00:46:05 +01:00
rhel82 distro: register distros explicitly 2019-11-29 00:46:05 +01:00
test distro: register distros explicitly 2019-11-29 00:46:05 +01:00
distro.go distro: register distros explicitly 2019-11-29 00:46:05 +01:00
distro_test.go distro: register distros explicitly 2019-11-29 00:46:05 +01:00
osrelease_test.go distro: add DetectHost 2019-11-10 17:23:14 +01:00