arch

package module
v0.0.0-...-a98bbbc Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2016 License: MIT Imports: 5 Imported by: 2

README

Detect CPU architecture on Windows

Go Report Card

import "github.com/koron/go-arch"

cpu, err := arch.Exe("explorer.exe")

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorUnknownArch = errors.New("unknown architecture")

ErrorUnknownArch is returned when failed to deetect architecture.

Functions

This section is empty.

Types

type CPU

type CPU int

CPU is type of CPU architecture.

const (
	// X86 means Intel x86 (32 bit).
	X86 CPU = iota + 1

	// AMD64 means AMD/Intel 64 bit.
	AMD64
)

func Exe

func Exe(name string) (CPU, error)

Exe returns architecture of execute file.

func OS

func OS() (CPU, error)

OS returns architecture of operating system.

func ParseCPU

func ParseCPU(s string) CPU

ParseCPU parses string as CPU.

func (CPU) String

func (cpu CPU) String() string

Jump to

Keyboard shortcuts

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