archvariant

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2022 License: MIT Imports: 2 Imported by: 80

README

go-archvariant

Go Reference Build Status

Go package for determining the maximum compatibility version of the current system. The main use case is to use this value in container platform definitions.

On x86-64 platforms this package returns the maximum current microarchitecture level as defined in https://en.wikipedia.org/wiki/X86-64#Microarchitecture_levels . This value can be used to configure compiler in LLVM since 12.0 and GCC since 11.0. Go1.18+ uses GOAMD64 environemnt to configure Go compiler with this value.

Scope

The goal of this repository is to only provide the variant with minimal external dependencies. If you need more specific CPU features detection you should look at golang.org/x/sys/cpu or github.com/klauspost/cpuid instead.

Credits

The checks in this repository are based on the checks Go runtime does on startup.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AMD64Variant

func AMD64Variant() string

Types

This section is empty.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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