gitlab.com/evatix-go/core@v1.3.55/internal/osconstsinternal/osconstsinternal.go (about) 1 package osconstsinternal 2 3 import ( 4 "runtime" 5 6 "gitlab.com/evatix-go/core/constants" 7 ) 8 9 // GOOS values https://stackoverflow.com/a/20728862 10 //goland:noinspection ALL 11 const ( 12 LsbCommand = "lsb_release" 13 Android = "android" 14 DarwinOrMacOs = "darwin" 15 DragonFly = "dragonfly" 16 FreeBsd = "freebsd" 17 Linux = "linux" 18 Nacl = "nacl" 19 NetBsd = "netbsd" 20 OpenBsd = "openbsd" 21 Plan9 = "plan9" 22 Solaris = "solaris" 23 Windows = "windows" 24 Unknown = "Unknown" 25 Any = "Any" 26 Illumos = "illumos" 27 IOs = "ios" 28 Aix = "aix" 29 NewLine = constants.NewLine 30 PathSeparator = constants.PathSeparator 31 CurrentOperatingSystem = runtime.GOOS 32 CurrentSystemArchitecture = runtime.GOARCH 33 IsWindows = CurrentOperatingSystem == Windows 34 IsLinux = CurrentOperatingSystem == Linux 35 IsDarwinOrMacOs = CurrentOperatingSystem == DarwinOrMacOs 36 IsPlan9 = CurrentOperatingSystem == Plan9 37 IsSolaris = CurrentOperatingSystem == Solaris 38 IsFreebsd = CurrentOperatingSystem == FreeBsd 39 IsNetBsd = CurrentOperatingSystem == NetBsd 40 IsOpenBsd = CurrentOperatingSystem == OpenBsd 41 IsDragonFly = CurrentOperatingSystem == DragonFly 42 IsNacl = CurrentOperatingSystem == Nacl 43 IsUnixGroup = !IsWindows 44 WindowsCDrive = "C:\\" 45 LinuxHome = "/home" 46 LinuxHomeSlash = "/home/" 47 LinuxBin = "/bin" 48 LinuxPermanentTemp = "/var/tmp/" // https://prnt.sc/gW0DA5d4jt6R, unix : /var/tmp/ 49 WindowsPermanentTemp = "c:\\Windows\\Temp" // or %temp% expand 50 )