distro: rename ListArchs to ListArches

In PR#395 we discussed the spelling of archs vs. arches and we agreed to
use arches. This patch only renames the public method `ListArchs`in the
`Distro` interface.
This commit is contained in:
Martin Sehnoutka 2020-03-30 09:00:51 +02:00 committed by msehnout
parent 57134548a1
commit 92145822d9
13 changed files with 13 additions and 13 deletions

View file

@ -26,7 +26,7 @@ type Distro interface {
// Returns a sorted list of the names of the architectures this distro
// supports.
ListArchs() []string
ListArches() []string
// Returns an object representing the given architecture as support
// by this distro.

View file

@ -48,7 +48,7 @@ type imageType struct {
assembler func(uefi bool, size uint64) *osbuild.Assembler
}
func (d *Fedora30) ListArchs() []string {
func (d *Fedora30) ListArches() []string {
archs := make([]string, 0, len(d.arches))
for name := range d.arches {
archs = append(archs, name)

View file

@ -121,7 +121,7 @@ func TestImageType_BuildPackages(t *testing.T) {
"aarch64": aarch64BuildPackages,
}
d := fedora30.New()
for _, archLabel := range d.ListArchs() {
for _, archLabel := range d.ListArches() {
archStruct, err := d.GetArch(archLabel)
if err != nil {
t.Errorf("d.GetArch(%v) returned err = %v; expected nil", archLabel, err)

View file

@ -47,7 +47,7 @@ type arch struct {
imageTypes map[string]imageType
}
func (d *Fedora31) ListArchs() []string {
func (d *Fedora31) ListArches() []string {
archs := make([]string, 0, len(d.arches))
for name := range d.arches {
archs = append(archs, name)

View file

@ -121,7 +121,7 @@ func TestImageType_BuildPackages(t *testing.T) {
"aarch64": aarch64BuildPackages,
}
d := fedora31.New()
for _, archLabel := range d.ListArchs() {
for _, archLabel := range d.ListArches() {
archStruct, err := d.GetArch(archLabel)
if err != nil {
t.Errorf("d.GetArch(%v) returned err = %v; expected nil", archLabel, err)

View file

@ -48,7 +48,7 @@ type imageType struct {
assembler func(uefi bool, size uint64) *osbuild.Assembler
}
func (d *Fedora32) ListArchs() []string {
func (d *Fedora32) ListArches() []string {
archs := make([]string, 0, len(d.arches))
for name := range d.arches {
archs = append(archs, name)

View file

@ -121,7 +121,7 @@ func TestImageType_BuildPackages(t *testing.T) {
"aarch64": aarch64BuildPackages,
}
d := fedora32.New()
for _, archLabel := range d.ListArchs() {
for _, archLabel := range d.ListArches() {
archStruct, err := d.GetArch(archLabel)
if err != nil {
t.Errorf("d.GetArch(%v) returned err = %v; expected nil", archLabel, err)

View file

@ -24,7 +24,7 @@ type fedoraTestDistroImageType struct {
arch *fedoraTestDistroArch
}
func (d *FedoraTestDistro) ListArchs() []string {
func (d *FedoraTestDistro) ListArches() []string {
return []string{"x86_64"}
}

View file

@ -57,7 +57,7 @@ type rhel81ImageType struct {
imageType *imageType
}
func (d *RHEL81) ListArchs() []string {
func (d *RHEL81) ListArches() []string {
archs := make([]string, 0, len(d.arches))
for name := range d.arches {
archs = append(archs, name)

View file

@ -57,7 +57,7 @@ type rhel82ImageType struct {
imageType *imageType
}
func (d *RHEL82) ListArchs() []string {
func (d *RHEL82) ListArches() []string {
archs := make([]string, 0, len(d.arches))
for name := range d.arches {
archs = append(archs, name)

View file

@ -16,7 +16,7 @@ type testImageType struct{}
const name = "test-distro"
const modulePlatformID = "platform:test"
func (d *TestDistro) ListArchs() []string {
func (d *TestDistro) ListArches() []string {
return []string{"test_arch"}
}