goarch

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2026 License: Apache-2.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package goarch parses the Go toolchain's architecture-specific build configuration. It deliberately contains Go semantics only; LLVM mappings belong to the backend.

Index

Constants

View Source
const (
	Default386   = "sse2"
	DefaultAMD64 = "v1"
	DefaultARM   = "7"
	DefaultARM64 = "v8.0"
)

Variables

This section is empty.

Functions

func Resolve386

func Resolve386(value string) (string, error)

Resolve386 validates and normalizes GO386. An empty value selects the Go toolchain default. Invalid input returns that default together with an error; callers must check the error unless fallback behavior is intentional.

func ResolveAMD64

func ResolveAMD64(value string) (string, error)

ResolveAMD64 validates and normalizes GOAMD64. An empty value selects the Go toolchain default. Invalid input returns that default together with an error; callers must check the error unless fallback behavior is intentional.

Types

type ARM

type ARM struct {
	Version   string
	SoftFloat bool
}

ARM describes a normalized GOARM value.

func ParseARM

func ParseARM(value string) (ARM, error)

ParseARM validates and normalizes GOARM. ARMv5 defaults to software floating point; ARMv6 and ARMv7 default to hardware floating point, matching Go. Invalid input returns a default-based value together with an error; callers must check the error unless fallback behavior is intentional.

func (ARM) String

func (f ARM) String() string

type ARM64

type ARM64 struct {
	Version string
	LSE     bool
	Crypto  bool
}

ARM64 describes a normalized GOARM64 value.

func ParseARM64

func ParseARM64(value string) (ARM64, error)

ParseARM64 validates and normalizes GOARM64. Extension suffixes may occur in either order, matching the Go toolchain. LSE is mandatory from ARMv8.1. Invalid input returns a default-based value together with an error; callers must check the error unless fallback behavior is intentional.

func (ARM64) String

func (f ARM64) String() string

Jump to

Keyboard shortcuts

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