Documentation
¶
Overview ¶
Package platform translates between Go's runtime platform names, OCI platform strings, Docker buildx platform strings, and the labels used by the VS Code server downloads.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Platform ¶
type Platform struct {
OS string // e.g. "linux"
Arch string // e.g. "amd64", "arm64", "arm"
Variant string // e.g. "v7" for armhf
}
Platform identifies a target build platform.
func Current ¶
func Current() Platform
Current returns the platform the current process is running on.
func (Platform) AlpineSuffix ¶
AlpineSuffix is "-alpine" when the platform string carries that suffix, allowing distinct download variants. The devcontainer spec doesn't model libc explicitly, so callers typically derive this elsewhere.
func (Platform) VSCodeServerArch ¶
VSCodeServerArch maps a Platform to the architecture label VS Code uses for server downloads.
Reference: https://update.code.visualstudio.com/api/update/server-linux-<arch>/stable/<commit>