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. |
||
|---|---|---|
| .. | ||
| types.go | ||
| types_test.go | ||