platform

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package platform provides platform identification utilities.

This package centralizes GOOS/GOARCH key generation that was previously duplicated across multiple packages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Current

func Current() string

Current returns the platform key for the current runtime.

func Key

func Key(goos, goarch string) string

Key returns "os/arch" for the given os and arch. This is the canonical format for platform identification in lockfiles, asset names, and registry lookups.

func Split

func Split(key string) (goos, goarch string)

Split splits "os/arch" into goos and goarch. Returns (platform, "") if no separator is found.

Types

This section is empty.

Jump to

Keyboard shortcuts

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