platform

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Architectures
	ArchAmd64   = "amd64"
	Archx86     = "x86_64"
	ArchArm64   = "arm64"
	ArchAarch64 = "aarch64"
	ArchRiscv64 = "riscv64"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Platform

type Platform struct {
	OS         string
	Arch       string
	GolangArch string
}

func New

func New(os, arch string) (*Platform, error)

func NewDefault

func NewDefault() (*Platform, error)

func NewFromArch

func NewFromArch(arch string) (*Platform, error)

func Parse

func Parse(s string) (*Platform, error)

Parse parses a string representing a Platform, if possible. code ported from go-containerregistry library

func (*Platform) String

func (p *Platform) String() string

Jump to

Keyboard shortcuts

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