osconsts

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2021 License: MIT Imports: 2 Imported by: 35

Documentation

Index

Constants

View Source
const (
	LsbCommand                = "lsb_release"
	Windows                   = "windows"
	Android                   = "android"
	DarwinOrMacOs             = "darwin"
	Linux                     = "linux"
	DragonFly                 = "dragonfly"
	FreeBsd                   = "freebsd"
	JavaScript                = "js"
	NetBsd                    = "netbsd"
	OpenBsd                   = "openbsd"
	Debian                    = "debian"
	MacOs                     = "mac"
	IOs                       = "ios"
	Ubuntu                    = "ubuntu"
	Unknown                   = "Unknown"
	NewLine                   = constants.NewLine
	PathSeparator             = constants.PathSeparator
	CurrentOperatingSystem    = runtime.GOOS
	CurrentSystemArchitecture = runtime.GOARCH
	IsWindows                 = CurrentOperatingSystem == Windows
	IsLinux                   = CurrentOperatingSystem == Linux
	IsDarwinOrMacOs           = CurrentOperatingSystem == DarwinOrMacOs
	IsUbuntu                  = CurrentOperatingSystem == Ubuntu
	IsUnixGroup               = !IsWindows
	WindowsCDrive             = "C:\\"
)

Variables

View Source
var (
	X32Architectures = []string{
		"386",
		"arm",
		"armbe",
		"mips",
		"amd64p32",
		"mips64p32",
		"mips64p32le",
		"ppc",
		"riscv",
		"s390",
		"sparc",
	}

	X64Architectures = []string{
		"amd64",
		"arm64",
		"ppc64",
		"ppc64le",
		"mips64",
		"mips64le",
		"riscv64",
		"s390x",
		"wasm",
		"arm64be",
		"sparc64",
	}

	UnixGroups = []string{
		"debian", "linux", "darwin", "mac", "ios", "ubuntu", "dragonfly", "freeBSD", "openBSD", "netBSD", "solaris",
	}
)
View Source
var (
	X32ArchitecturesMap = map[string]bool{
		"386":         true,
		"arm":         true,
		"armbe":       true,
		"mips":        true,
		"amd64p32":    true,
		"mips64p32":   true,
		"mips64p32le": true,
		"ppc":         true,
		"riscv":       true,
		"s390":        true,
		"sparc":       true,
	}

	X64ArchitecturesMap = map[string]bool{
		"amd64":    true,
		"arm64":    true,
		"ppc64":    true,
		"ppc64le":  true,
		"mips64":   true,
		"mips64le": true,
		"riscv64":  true,
		"s390x":    true,
		"wasm":     true,
		"arm64be":  true,
		"sparc64":  true,
	}

	UnixGroupsMap = map[string]bool{
		"debian":    true,
		"linux":     true,
		"darwin":    true,
		"mac":       true,
		"ios":       true,
		"ubuntu":    true,
		"dragonfly": true,
		"freeBSD":   true,
		"openBSD":   true,
		"netBSD":    true,
		"solaris":   true,
	}
)
View Source
var (
	IsX32Architecture = isX32Bit()
	IsX64Architecture = !IsX32Architecture
)
View Source
var (
	WindowsCDrivePtr = &windowsCDrive
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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