Help us shape the future of Go! Take the 2026 Go Developer Survey

platforms

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

View Source
const (
	Unknown = "unknown"
	Arm     = "arm"
	Arm64   = "arm64"
	Windows = "windows"
	Darwin  = "darwin"
	FreeBSD = "freebsd"
	Linux   = "linux"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Platform

type Platform struct {
	// Architecture field specifies the CPU architecture, for example
	// `amd64` or `ppc64le`.
	Architecture string `json:"architecture"`

	// OS specifies the operating system, for example `linux` or `windows`.
	OS string `json:"os"`

	// OSVersion is an optional field specifying the operating system
	// version, for example on Windows `10.0.14393.1066`.
	OSVersion string `json:"os.version,omitempty"`

	// OSFeatures is an optional field specifying an array of strings,
	// each listing a required OS feature (for example on Windows `win32k`).
	OSFeatures []string `json:"os.features,omitempty"`

	// Variant is an optional field specifying a variant of the CPU, for
	// example `v7` to specify ARMv7 when architecture is `arm`.
	Variant string `json:"variant,omitempty"`
}

Platform describes the platform which the image in the manifest runs on.

func NewPlatform

func NewPlatform() *Platform

func (*Platform) Format

func (p *Platform) Format() string

Jump to

Keyboard shortcuts

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