Documentation
¶
Overview ¶
Package detect provides functionality for detecting and managing platform-specific information, including the operating system, architecture, system library, file extension, and distribution. It offers utilities to parse platform details from strings, set default platform configurations, and merge platform data from different sources.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Platform ¶
type Platform struct {
OS platform.OS // OS represents the operating system (e.g., Linux, Windows, macOS).
Architecture platform.Architecture // Architecture defines the platform's CPU architecture and version.
Library platform.Library // Library specifies the system library (e.g., GNU, Musl, MSVC).
Extension platform.Extension // Extension represents the default file extension for executables.
Distribution platform.Distribution // Distribution refers to the Linux distribution, if applicable.
}
Platform defines the characteristics of the platform, including OS, architecture, library, extension, and distribution.
func (*Platform) Detect ¶
Detect gathers information about the current platform, such as the operating system, architecture, distribution, library, and file extension, and populates the Platform struct accordingly.
func (*Platform) Merge ¶
Merge combines another Platform's fields into the current Platform, setting fields that are empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package platform provides types and utilities for representing and working with different system platforms, including architectures, operating systems, libraries, and distributions.
|
Package platform provides types and utilities for representing and working with different system platforms, including architectures, operating systems, libraries, and distributions. |