machine

package
v4.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 5, 2024 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnknownArch = errors.New("architecture not recognized")

ErrUnknownArch is the error returned for unknown architecture.

Functions

func ArchFromContainer

func ArchFromContainer(container string) string

ArchFromContainer walks through a container filesystem until it find an elf binary to read target architecture from and returns it. If there is no suitable elf binary or if the architecture is not recognized it will return an empty string.

func ArchFromElf

func ArchFromElf(binary string) (string, error)

ArchFromElf returns the architecture string after inspection of the provided elf binary.

func CompatibleWith

func CompatibleWith(arch string) bool

CompatibleWith returns if the current machine architecture is compatible or can run via emulation the architecture passed in argument.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL