debian-forge-composer/internal/store
Achilleas Koutsou f32e653315 store: trim compat string map
The map is meant to maintain compatibility with changes in image type
names.  Most entries however map to themselves.  It's redundant to keep
updating this map with every new image type name and map it to itself.
Instead, check the map for a compat string and if one doesn't exist,
return the original.

Conversely, when the inverse lookup is performed, first check if the
compat string is a valid image type name and only iterate the map if
it's not.

Now we don't need to update the map every time we introduce a new image
type, unless we need to map an old name to a new one.
2022-09-13 16:06:19 +01:00
..
test store: verify that old versions of the store can still be unmarshalled 2020-06-03 00:30:01 +02:00
compose.go store: delete unused GetLocalTargetOptions() method 2022-07-01 18:55:01 +01:00
fixtures.go distro: add containers arg to ImageType.Manifest 2022-07-21 13:32:07 +02:00
json.go store: trim compat string map 2022-09-13 16:06:19 +01:00
json_test.go target: move Filename from target options to Target 2022-07-01 18:55:01 +01:00
store.go store: Filter out blank blueprint name 2022-02-15 10:10:21 +01:00
store_test.go distro: add containers arg to ImageType.Manifest 2022-07-21 13:32:07 +02:00