debian-forge-composer/internal/common
Martin Sehnoutka 8dac72f4fd internal: propose custom types for image types, arches, etc.
We currently use strings for passing arches and image types around,
which is not ideal. We should have a finite set of supported image types
and architectures as well as upload targets. This PR introduces custom
types to make the code base more readable and possibly also more
correct.

I considered some alternatives like a struct with private fields, but struct cannot
be const, so that does not help either. Eventually I think this is the "get s**t done"
solution.

The package also includes unit-tests which try to convert string to
structure and the other way around to make sure it all works properly.
2020-01-30 14:42:25 +01:00
..
types.go internal: propose custom types for image types, arches, etc. 2020-01-30 14:42:25 +01:00
types_test.go internal: propose custom types for image types, arches, etc. 2020-01-30 14:42:25 +01:00