ostype

package
v1.3.55 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2022 License: MIT Imports: 5 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CurrentGroupVariant = GetGroupVariant()
	// CurrentGroup Current os group
	CurrentGroup = CurrentGroupVariant.Group
	// Type Current Os Type
	Type = CurrentGroupVariant.Variation
)

Functions

This section is empty.

Types

type Group

type Group byte
const (
	WindowsGroup Group = iota
	UnixGroup
	AndroidGroup
	InvalidGroup
)

func GetCurrentGroup

func GetCurrentGroup() Group

func GetGroup

func GetGroup(rawRuntimeGoos string) Group

GetGroup rawRuntimeGoos = runtime.GOOS

func (Group) AllNameValues added in v1.2.16

func (it Group) AllNameValues() []string

func (Group) AsBasicByteEnumContractsBinder added in v1.0.4

func (it Group) AsBasicByteEnumContractsBinder() enuminf.BasicByteEnumContractsBinder

func (*Group) AsBasicEnumContractsBinder added in v1.0.4

func (it *Group) AsBasicEnumContractsBinder() enuminf.BasicEnumContractsBinder

func (*Group) AsJsonContractsBinder added in v1.0.4

func (it *Group) AsJsonContractsBinder() corejson.JsonMarshaller

func (Group) Byte

func (it Group) Byte() byte

func (Group) EnumType added in v1.1.9

func (it Group) EnumType() enuminf.EnumTyper

func (Group) Format added in v1.1.9

func (it Group) Format(format string) (compiled string)

func (Group) IntegerEnumRanges added in v1.2.16

func (it Group) IntegerEnumRanges() []int

func (Group) Is

func (it Group) Is(another Group) bool

func (Group) IsAndroid

func (it Group) IsAndroid() bool

func (*Group) IsAnyEnumsEqual added in v1.1.9

func (it *Group) IsAnyEnumsEqual(enums ...enuminf.BasicEnumer) bool

func (Group) IsAnyNamesOf added in v1.2.3

func (it Group) IsAnyNamesOf(names ...string) bool

func (Group) IsAnyValuesEqual added in v1.1.9

func (it Group) IsAnyValuesEqual(anyByteValues ...byte) bool

func (Group) IsByteValueEqual added in v1.2.1

func (it Group) IsByteValueEqual(value byte) bool

func (Group) IsEnumEqual added in v1.1.9

func (it Group) IsEnumEqual(enum enuminf.BasicEnumer) bool

func (Group) IsInvalid added in v1.1.8

func (it Group) IsInvalid() bool

func (Group) IsInvalidGroup added in v1.1.8

func (it Group) IsInvalidGroup() bool

func (Group) IsNameEqual added in v1.1.9

func (it Group) IsNameEqual(name string) bool

func (Group) IsUnix

func (it Group) IsUnix() bool

func (Group) IsValid added in v1.1.8

func (it Group) IsValid() bool

func (Group) IsValueEqual added in v1.1.9

func (it Group) IsValueEqual(value byte) bool

func (Group) IsWindows

func (it Group) IsWindows() bool

func (Group) MarshalJSON added in v1.0.4

func (it Group) MarshalJSON() ([]byte, error)

func (Group) MaxByte added in v1.0.4

func (it Group) MaxByte() byte

func (Group) MaxInt added in v1.2.14

func (it Group) MaxInt() int

func (Group) MaxValueString added in v1.2.14

func (it Group) MaxValueString() string

func (Group) MinByte added in v1.0.4

func (it Group) MinByte() byte

func (Group) MinInt added in v1.2.14

func (it Group) MinInt() int

func (Group) MinMaxAny added in v1.3.15

func (it Group) MinMaxAny() (min, max interface{})

func (Group) MinValueString added in v1.2.14

func (it Group) MinValueString() string

func (Group) Name added in v1.0.4

func (it Group) Name() string

func (Group) NameValue added in v1.0.4

func (it Group) NameValue() string

func (Group) OnlySupportedErr added in v1.2.16

func (it Group) OnlySupportedErr(names ...string) error

func (Group) OnlySupportedMsgErr added in v1.2.16

func (it Group) OnlySupportedMsgErr(message string, names ...string) error

func (Group) RangeNamesCsv added in v1.0.4

func (it Group) RangeNamesCsv() string

func (Group) RangesByte added in v1.0.4

func (it Group) RangesByte() []byte

func (Group) RangesDynamicMap added in v1.2.14

func (it Group) RangesDynamicMap() map[string]interface{}

func (Group) String

func (it Group) String() string

func (Group) ToNumberString added in v1.0.4

func (it Group) ToNumberString() string

func (Group) ToPtr added in v1.2.15

func (it Group) ToPtr() *Group

func (Group) TypeName added in v1.0.4

func (it Group) TypeName() string

func (*Group) UnmarshalJSON added in v1.0.4

func (it *Group) UnmarshalJSON(data []byte) error

func (Group) UnmarshallEnumToValue added in v1.0.4

func (it Group) UnmarshallEnumToValue(jsonUnmarshallingValue []byte) (byte, error)

func (Group) Value

func (it Group) Value() byte

func (Group) ValueByte added in v1.0.4

func (it Group) ValueByte() byte

func (Group) ValueInt added in v1.1.9

func (it Group) ValueInt() int

func (Group) ValueInt16 added in v1.1.9

func (it Group) ValueInt16() int16

func (Group) ValueInt32 added in v1.1.9

func (it Group) ValueInt32() int32

func (Group) ValueInt8 added in v1.1.9

func (it Group) ValueInt8() int8

func (Group) ValueString added in v1.1.9

func (it Group) ValueString() string

func (Group) ValueUInt16 added in v1.2.16

func (it Group) ValueUInt16() uint16

type GroupVariant

type GroupVariant struct {
	Group
	Variation
}

func GetGroupVariant

func GetGroupVariant() GroupVariant

func GetGroupVariantPtr

func GetGroupVariantPtr() *GroupVariant

type Variation

type Variation byte
const (
	Any Variation = iota
	Unknown
	Windows
	Linux
	DarwinOrMacOs
	JavaScript
	FreeBsd
	NetBsd
	OpenBsd
	DragonFly
	Android
	Plan9
	Solaris
	Nacl
	Illumos
	IOs
	Aix
)

https://stackoverflow.com/a/50117892 | https://gist.github.com/asukakenji/f15ba7e588ac42795f421b48b8aede63 go tool dist list

func GetCurrentVariant

func GetCurrentVariant() Variation

func GetVariant

func GetVariant(rawRuntimeGoos string) Variation

func (Variation) AllNameValues added in v1.2.16

func (it Variation) AllNameValues() []string

func (Variation) AsBasicByteEnumContractsBinder added in v1.0.4

func (it Variation) AsBasicByteEnumContractsBinder() enuminf.BasicByteEnumContractsBinder

func (Variation) AsBasicEnumContractsBinder added in v1.0.4

func (it Variation) AsBasicEnumContractsBinder() enuminf.BasicEnumContractsBinder

func (Variation) AsJsonContractsBinder added in v1.0.4

func (it Variation) AsJsonContractsBinder() corejson.JsonMarshaller

func (Variation) EnumType added in v1.1.9

func (it Variation) EnumType() enuminf.EnumTyper

func (Variation) Format added in v1.1.9

func (it Variation) Format(format string) (compiled string)

func (Variation) GoosName added in v1.0.8

func (it Variation) GoosName() string

func (Variation) Group added in v0.0.7

func (it Variation) Group() Group

func (Variation) IntegerEnumRanges added in v1.2.16

func (it Variation) IntegerEnumRanges() []int

func (Variation) Is

func (it Variation) Is(other Variation) bool

func (Variation) IsActualGroupUnix added in v0.0.7

func (it Variation) IsActualGroupUnix() bool

func (*Variation) IsAnyEnumsEqual added in v1.1.9

func (it *Variation) IsAnyEnumsEqual(enums ...enuminf.BasicEnumer) bool

func (Variation) IsAnyMatch added in v0.0.7

func (it Variation) IsAnyMatch(others ...Variation) bool

func (Variation) IsAnyNamesOf added in v1.2.3

func (it Variation) IsAnyNamesOf(names ...string) bool

func (Variation) IsAnyOperatingSystem added in v0.0.7

func (it Variation) IsAnyOperatingSystem() bool

func (Variation) IsAnyValuesEqual added in v1.1.9

func (it Variation) IsAnyValuesEqual(anyByteValues ...byte) bool

func (Variation) IsByte

func (it Variation) IsByte(another byte) bool

func (Variation) IsByteValueEqual added in v1.2.1

func (it Variation) IsByteValueEqual(value byte) bool

func (Variation) IsDarwinOrMacOs

func (it Variation) IsDarwinOrMacOs() bool

func (Variation) IsDragonFly

func (it Variation) IsDragonFly() bool

func (Variation) IsEnumEqual added in v1.1.9

func (it Variation) IsEnumEqual(enum enuminf.BasicEnumer) bool

func (Variation) IsFreeBsd

func (it Variation) IsFreeBsd() bool

func (Variation) IsInvalid added in v1.1.8

func (it Variation) IsInvalid() bool

func (Variation) IsJavaScript

func (it Variation) IsJavaScript() bool

func (Variation) IsLinux

func (it Variation) IsLinux() bool

func (Variation) IsLinuxOrMac added in v0.0.7

func (it Variation) IsLinuxOrMac() bool

func (Variation) IsNameEqual added in v1.1.9

func (it Variation) IsNameEqual(name string) bool

func (Variation) IsNetBsd

func (it Variation) IsNetBsd() bool

func (Variation) IsOpenBsd

func (it Variation) IsOpenBsd() bool

func (Variation) IsPossibleUnixGroup added in v0.0.7

func (it Variation) IsPossibleUnixGroup() bool

IsPossibleUnixGroup variation != Windows

func (Variation) IsStringsMatchAny added in v0.0.7

func (it Variation) IsStringsMatchAny(others ...string) bool

func (Variation) IsValid added in v1.1.8

func (it Variation) IsValid() bool

func (Variation) IsValueEqual added in v1.1.9

func (it Variation) IsValueEqual(value byte) bool

func (Variation) IsWindows

func (it Variation) IsWindows() bool

func (Variation) MarshalJSON added in v1.0.4

func (it Variation) MarshalJSON() ([]byte, error)

func (Variation) MaxByte added in v1.0.4

func (it Variation) MaxByte() byte

func (Variation) MaxInt added in v1.2.14

func (it Variation) MaxInt() int

func (Variation) MaxValueString added in v1.2.14

func (it Variation) MaxValueString() string

func (Variation) MinByte added in v1.0.4

func (it Variation) MinByte() byte

func (Variation) MinInt added in v1.2.14

func (it Variation) MinInt() int

func (Variation) MinMaxAny added in v1.3.15

func (it Variation) MinMaxAny() (min, max interface{})

func (Variation) MinValueString added in v1.2.14

func (it Variation) MinValueString() string

func (Variation) Name added in v1.0.4

func (it Variation) Name() string

func (Variation) NameValue added in v1.0.4

func (it Variation) NameValue() string

func (Variation) OnlySupportedErr added in v1.2.16

func (it Variation) OnlySupportedErr(names ...string) error

func (Variation) OnlySupportedMsgErr added in v1.2.16

func (it Variation) OnlySupportedMsgErr(message string, names ...string) error

func (Variation) RangeNamesCsv added in v1.0.4

func (it Variation) RangeNamesCsv() string

func (Variation) RangesByte added in v1.0.4

func (it Variation) RangesByte() []byte

func (Variation) RangesDynamicMap added in v1.2.14

func (it Variation) RangesDynamicMap() map[string]interface{}

func (Variation) String

func (it Variation) String() string

func (Variation) ToNumberString added in v1.0.4

func (it Variation) ToNumberString() string

func (Variation) ToPtr added in v1.2.15

func (it Variation) ToPtr() *Variation

func (Variation) TypeName added in v1.0.4

func (it Variation) TypeName() string

func (*Variation) UnmarshalJSON added in v1.0.4

func (it *Variation) UnmarshalJSON(data []byte) error

func (Variation) UnmarshallEnumToValue added in v1.0.4

func (it Variation) UnmarshallEnumToValue(jsonUnmarshallingValue []byte) (byte, error)

func (Variation) Value

func (it Variation) Value() byte

func (Variation) ValueByte added in v1.0.4

func (it Variation) ValueByte() byte

func (Variation) ValueInt added in v1.1.9

func (it Variation) ValueInt() int

func (Variation) ValueInt16 added in v1.1.9

func (it Variation) ValueInt16() int16

func (Variation) ValueInt32 added in v1.1.9

func (it Variation) ValueInt32() int32

func (Variation) ValueInt8 added in v1.1.9

func (it Variation) ValueInt8() int8

func (Variation) ValueString added in v1.1.9

func (it Variation) ValueString() string

func (Variation) ValueUInt16 added in v1.2.16

func (it Variation) ValueUInt16() uint16

Jump to

Keyboard shortcuts

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