distro: add ListArchs() to Distro interface
Similar to ListImageTypes() add a helper to enumerate the supported architectures. Signed-off-by: Tom Gundersen <teg@jklm.no>
This commit is contained in:
parent
4a7519807e
commit
f903601ec4
8 changed files with 57 additions and 0 deletions
|
|
@ -16,6 +16,10 @@ type testImageType struct{}
|
|||
const name = "test-distro"
|
||||
const modulePlatformID = "platform:test"
|
||||
|
||||
func (d *TestDistro) ListArchs() []string {
|
||||
return []string{"test_arch"}
|
||||
}
|
||||
|
||||
func (d *TestDistro) GetArch(arch string) (distro.Arch, error) {
|
||||
if arch != "test_arch" {
|
||||
return nil, errors.New("invalid arch: " + arch)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue