platform

package
v0.3.22 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMissingArch      = errors.New("missing architecture")
	ErrUnrecognizedArch = errors.New("unrecognized architecture")
)
View Source
var (
	ErrMissingOS      = errors.New("missing OS")
	ErrUnrecognizedOS = errors.New("unrecognized OS")
)

Functions

This section is empty.

Types

type Arch

type Arch uint

CPU architectures which Godot supports targeting.

const (
	ArchUnknown Arch = iota
	ArchAmd64
	ArchArm32
	ArchArm64
	ArchI386
	ArchUniversal
)

func MustParseArch

func MustParseArch(input string) Arch

Parses an input string as a CPU architecture specification but panics if it would fail.

func ParseArch

func ParseArch(input string) (Arch, error)

Parses an input string as a CPU architecture specification.

NOTE: This is a best effort implementation. Please open an issue on GitHub if some values are missing: github.com/coffeebeats/gdbuild/issues/new?labels=bug&template=%F0%9F%90%9B-bug-report.md.

func (Arch) IsOneOf

func (a Arch) IsOneOf(aa ...Arch) bool

IsOneOf returns whether the 'Arch' is in the allowed set.

func (Arch) String

func (a Arch) String() string

String implements 'fmt.Stringer' for 'Arch' according to the architecture names passed to SCons during compilation.

func (*Arch) UnmarshalText

func (a *Arch) UnmarshalText(bb []byte) error

type OS

type OS uint

Operating systems which the Godot project supports building for.

const (
	OSUnknown OS = iota
	OSAndroid
	OSIOS
	OSLinux
	OSMacOS
	OSWeb
	OSWindows
)

func MustParseOS

func MustParseOS(input string) OS

Parses an input string as an operating system specification but panics if it would fail.

func ParseOS

func ParseOS(input string) (OS, error)

Parses an input string as an operating system specification.

NOTE: This is a best effort implementation. Please open an issue on GitHub if some values are missing: github.com/coffeebeats/gdbuild/issues/new?labels=bug&template=%F0%9F%90%9B-bug-report.md.

func (OS) String

func (o OS) String() string

String implements 'fmt.Stringer' for 'OS' according to the platform names passed to SCons during compilation.

func (*OS) UnmarshalText

func (o *OS) UnmarshalText(bb []byte) error

Jump to

Keyboard shortcuts

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