Documentation
¶
Index ¶
- Constants
- func ArchitectureGetLocal() (string, error)
- func ArchitectureGetLocalID() (int, error)
- func ArchitectureID(arch string) (int, error)
- func ArchitectureName(arch int) (string, error)
- func ArchitecturePersonalities(arch int) ([]int, error)
- func ArchitecturePersonality(arch int) (string, error)
- func GetOSRelease() (map[string]string, error)
- func SupportedArchitectures() []string
Constants ¶
const ( ARCH_UNKNOWN = 0 ARCH_32BIT_INTEL_X86 = 1 ARCH_64BIT_INTEL_X86 = 2 ARCH_32BIT_ARMV7_LITTLE_ENDIAN = 3 ARCH_64BIT_ARMV8_LITTLE_ENDIAN = 4 ARCH_32BIT_POWERPC_BIG_ENDIAN = 5 ARCH_64BIT_POWERPC_BIG_ENDIAN = 6 ARCH_64BIT_POWERPC_LITTLE_ENDIAN = 7 ARCH_64BIT_S390_BIG_ENDIAN = 8 ARCH_32BIT_MIPS = 9 ARCH_64BIT_MIPS = 10 ARCH_32BIT_RISCV_LITTLE_ENDIAN = 11 ARCH_64BIT_RISCV_LITTLE_ENDIAN = 12 ARCH_32BIT_ARMV6_LITTLE_ENDIAN = 13 ARCH_32BIT_ARMV8_LITTLE_ENDIAN = 14 ARCH_64BIT_LOONGARCH = 15 )
nolint:revive
const ArchitectureDefault = "x86_64"
ArchitectureDefault is the fallback architecture when the local architecture can't be properly detected.
Variables ¶
This section is empty.
Functions ¶
func ArchitectureGetLocal ¶
ArchitectureGetLocal returns the local hardware architecture.
func ArchitectureGetLocalID ¶
ArchitectureGetLocalID returns the local hardware architecture ID.
func ArchitectureID ¶ added in v6.0.5
ArchitectureID converts an architecture name to its ID.
func ArchitectureName ¶
ArchitectureName converts an architecture ID to its name.
func ArchitecturePersonalities ¶
ArchitecturePersonalities returns the list of personalities for the provided architecture.
func ArchitecturePersonality ¶
ArchitecturePersonality returns the kernel personality name for the architecture.
func GetOSRelease ¶ added in v6.0.4
GetOSRelease returns a map with Linux distribution information.
func SupportedArchitectures ¶
func SupportedArchitectures() []string
SupportedArchitectures returns the list of all supported architectures.
Types ¶
This section is empty.