lxd/util/sys.go
func GetArchitectures() ([]int, error) {
	architectures := []int{}

	architectureName, err := osarch.ArchitectureGetLocal()
	if err != nil {
		return nil, err
	}

	architecture, err := osarch.ArchitectureId(architectureName)
	if err != nil {
		return nil, err
	}
	architectures = append(architectures, architecture)

	personalities, err := osarch.ArchitecturePersonalities(architecture)
	if err != nil {
		return nil, err
	}
	for _, personality := range personalities {
		architectures = append(architectures, personality)
	}
	return architectures, nil
}
func GetArchitectures() ([]int, error) {
	architectures := []int{}

	architectureName, err := osarch.ArchitectureGetLocal()
	if err != nil {
		return nil, err
	}

	architecture, err := osarch.ArchitectureId(architectureName)
	if err != nil {
		return nil, err
	}
	architectures = append(architectures, architecture)

	personalities, err := osarch.ArchitecturePersonalities(architecture)
	if err != nil {
		return nil, err
	}
	for _, personality := range personalities {
		architectures = append(architectures, personality)
	}
	return architectures, nil
}
func GetArchitectures ( ) ( [ ] int , error ) { architectures := [ ] int { } architectureName , err := osarch . ArchitectureGetLocal ( ) if err != nil { return nil , err } architecture , err := osarch . ArchitectureId ( architectureName ) if err != nil { return nil , err } architectures = append ( architectures , architecture ) personalities , err := osarch . ArchitecturePersonalities ( architecture ) if err != nil { return nil , err } for _ , personality := range personalities { architectures = append ( architectures , personality ) } return architectures , nil }
// GetArchitectures returns the list of supported architectures.
GetArchitectures returns the list of supported architectures .