platforms

package
v0.0.0-...-17c0c07 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2015 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Support for different target platforms (Operating Systems and Architectures) supported by the Go compiler

Index

Constants

View Source
const (
	AMD64     = "amd64"
	AMD64P32  = "amd64p32"
	X86       = "386"
	ARM       = "arm"
	DARWIN    = "darwin"
	DRAGONFLY = "dragonfly"
	FREEBSD   = "freebsd"
	LINUX     = "linux"
	NACL      = "nacl"
	NETBSD    = "netbsd"
	OPENBSD   = "openbsd"
	PLAN9     = "plan9"
	SOLARIS   = "solaris"
	WINDOWS   = "windows"
)

Variables

Functions

func ContainsPlatform

func ContainsPlatform(haystack []Platform, needle Platform) bool

func IsArch

func IsArch(part string) bool

check if a string is a valid architecture name

func IsOs

func IsOs(part string) bool

check if a string is a valid OS name

Types

type Platform

type Platform struct {
	Os   string
	Arch string
}

represents a target compilation platform

func ApplyBuildConstraints

func ApplyBuildConstraints(buildConstraints string, unfilteredPlatforms []Platform) []Platform

parse and filter list of platforms

func GetDestPlatforms

func GetDestPlatforms(specifiedOses string, specifiedArches string) []Platform

interpret list of destination platforms (based on os & arch settings) 0.5 add support for space delimiters (similar to BuildConstraints) 0.5 add support for different oses/services

Jump to

Keyboard shortcuts

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