const runtime.GOOS
180 uses
runtime (current package)
cgocall.go#L135: if !iscgo && GOOS != "solaris" && GOOS != "illumos" && GOOS != "windows" {
cpuprof.go#L248: if GOOS == "darwin" || GOOS == "ios" {
env_posix.go#L25: if GOOS == "windows" { // case insensitive
extern.go#L373: const GOOS string = goos.GOOS
malloc.go#L529: case GOARCH == "arm64" && GOOS == "ios":
malloc.go#L533: case GOOS == "aix":
malloc.go#L851: case GOOS == "windows":
malloc.go#L1821: if GOOS == "plan9" {
mheap.go#L52: physPageAlignedStacks = GOOS == "openbsd"
netpoll.go#L348: if GOOS == "solaris" || GOOS == "illumos" || GOOS == "aix" || GOOS == "wasip1" {
panic.go#L1473: if GOOS == "windows" && mp.libcallsp != 0 {
proc.go#L222: if GOOS != "windows" {
proc.go#L625: const crashStackImplemented = GOOS != "windows"
proc.go#L734: switch GOOS {
proc.go#L767: switch GOOS {
proc.go#L975: if iscgo || GOOS == "solaris" || GOOS == "illumos" || GOOS == "windows" {
proc.go#L1028: osHasLowResTimer = GOOS == "windows" || GOOS == "openbsd" || GOOS == "netbsd"
proc.go#L1758: switch GOOS {
proc.go#L1770: switch GOOS {
proc.go#L1885: if (iscgo || GOOS == "windows") && !cgoHasExtraM {
proc.go#L1995: if GOOS == "darwin" || GOOS == "ios" {
proc.go#L2316: if (iscgo || GOOS == "windows") && !cgoHasExtraM {
proc.go#L2612: if GOOS == "windows" || GOOS == "plan9" {
proc.go#L2793: if gp := getg(); gp != nil && gp.m != nil && (gp.m.lockedExt != 0 || gp.m.incgo) && GOOS != "plan9" {
proc.go#L3884: if GOOS != "plan9" { // Temporary workaround - see issue #42303.
proc.go#L4390: if GOOS != "plan9" { // See golang.org/issue/22227.
proc.go#L5004: if GOOS == "darwin" || GOOS == "ios" {
proc.go#L5359: if atomic.Load(&newmHandoff.haveTemplateThread) == 0 && GOOS != "plan9" {
proc.go#L5497: if GOARCH == "arm" && goarm < 7 && GOOS == "linux" && pc&0xffff0000 == 0xffff0000 {
proc.go#L6209: if GOOS == "netbsd" && needSysmonWorkaround {
runtime1.go#L73: if GOOS == "windows" {
runtime1.go#L403: if GOOS == "linux" {
runtime1.go#L550: if GOOS == "windows" {
signal_amd64.go#L53: if GOOS == "darwin" && sig == _SIGFPE && gp.sigcode0 == 0 {
signal_unix.go#L165: if (GOOS == "linux" || GOOS == "android") && !iscgo && sig == sigPerThreadSyscall {
signal_unix.go#L355: if GOOS == "darwin" || GOOS == "ios" {
signal_unix.go#L371: if GOOS == "darwin" || GOOS == "ios" {
signal_unix.go#L376: if GOOS == "darwin" || GOOS == "ios" {
signal_unix.go#L388: if GOOS == "darwin" || GOOS == "ios" {
signal_unix.go#L455: if GOOS == "darwin" || GOOS == "ios" {
signal_unix.go#L676: if (GOOS == "linux" || GOOS == "android") && sig == sigPerThreadSyscall {
signal_unix.go#L1034: if GOOS != "freebsd" && (isarchive || islibrary) && handler == _SIG_DFL && !c.sigFromUser() {
signal_unix.go#L1190: if (GOOS == "darwin" || GOOS == "ios") && sig == _SIGPIPE {
signal_unix.go#L1257: if GOOS == "linux" && iscgo {
sigqueue.go#L112: if GOOS == "darwin" || GOOS == "ios" {
sigqueue.go#L148: if GOOS == "darwin" || GOOS == "ios" {
sigqueue.go#L204: if GOOS == "darwin" || GOOS == "ios" {
string.go#L552: if GOOS == "plan9" {
symtab.go#L641: if GOOS == "aix" && isarchive {
tagptr_64bit.go#L58: if GOOS == "aix" {
tagptr_64bit.go#L77: if GOOS == "aix" {
traceback.go#L190: if GOARCH == "arm" && goarm < 7 && GOOS == "linux" && frame.pc&0xffff0000 == 0xffff0000 {
type.go#L107: if GOOS == "aix" {
runtime/pprof
pprof_rusage.go#L19: switch runtime.GOOS {
crypto/internal/fips140
fips140.go#L47: runtime.GOOS == "windows" && runtime.GOARCH == "386",
fips140.go#L48: runtime.GOOS == "windows" && runtime.GOARCH == "arm",
fips140.go#L49: runtime.GOOS == "openbsd", // due to -fexecute-only, see #70880
fips140.go#L50: runtime.GOOS == "aix":
fips140.go#L51: return errors.New("FIPS 140-3 mode is not supported on " + runtime.GOOS + "-" + runtime.GOARCH)
crypto/internal/sysrand
rand_getrandom.go#L37: if runtime.GOOS == "solaris" {
crypto/x509
verify.go#L797: if runtime.GOOS == "windows" || runtime.GOOS == "darwin" || runtime.GOOS == "ios" {
go/build
build.go#L294: if runtime.GOOS == "windows" {
build.go#L296: } else if runtime.GOOS == "plan9" {
build.go#L371: if runtime.GOARCH == c.GOARCH && runtime.GOOS == c.GOOS {
gc.go#L16: return filepath.Join(runtime.GOROOT(), "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH)
golang.org/x/net/http2
server.go#L781: if runtime.GOOS == "windows" {
golang.org/x/sys/cpu
cpu_x86.go#L97: if runtime.GOOS == "darwin" {
golang.org/x/sys/unix
sockcmsg_unix_other.go#L19: switch runtime.GOOS {
sockcmsg_unix_other.go#L36: if runtime.GOOS == "netbsd" && runtime.GOARCH == "arm64" {
golang.org/x/tools/internal/gocommand
invoke.go#L428: switch runtime.GOOS {
invoke.go#L447: if runtime.GOOS == "freebsd" || runtime.GOOS == "netbsd" {
internal/buildcfg
zbootstrap.go#L19: const defaultGOOS = runtime.GOOS
internal/poll
sendfile_unix.go#L31: if goos := runtime.GOOS; goos == "linux" || goos == "android" {
sendfile_unix.go#L134: switch runtime.GOOS {
writev.go#L33: if runtime.GOOS == "aix" || runtime.GOOS == "solaris" {
internal/syscall/unix
eaccess.go#L15: if runtime.GOOS == "android" {
net
cgo_unix.go#L200: if runtime.GOOS == "freebsd" {
conf.go#L74: confVal = &conf{goos: runtime.GOOS}
conf.go#L142: switch runtime.GOOS {
conf.go#L159: if runtime.GOOS == "openbsd" && os.Getenv("ASR_CONFIG") != "" {
conf.go#L168: switch runtime.GOOS {
conf.go#L201: if runtime.GOOS == "plan9" {
dnsclient_unix.go#L407: switch runtime.GOOS {
fd_unix.go#L78: if runtime.GOOS == "solaris" || runtime.GOOS == "illumos" {
ipsock.go#L51: switch runtime.GOOS {
ipsock_posix.go#L29: switch runtime.GOOS {
ipsock_posix.go#L54: switch runtime.GOOS {
ipsock_posix.go#L160: switch runtime.GOOS {
net/http
h2_bundle.go#L4831: if runtime.GOOS == "windows" {
os
dir_unix.go#L107: if ino == 0 && runtime.GOOS != "wasip1" {
eloop_other.go#L20: if runtime.GOOS == "dragonfly" {
exec_posix.go#L65: if runtime.GOOS != "windows" {
exec_posix.go#L117: if runtime.GOOS == "windows" && uint(code) >= 1<<16 { // windows uses large hex numbers
executable_procfs.go#L17: switch runtime.GOOS {
executable_procfs.go#L19: return "", errors.New("Executable not implemented for " + runtime.GOOS)
file.go#L346: if runtime.GOOS == "windows" {
file.go#L490: switch runtime.GOOS {
file.go#L543: switch runtime.GOOS {
file.go#L590: switch runtime.GOOS {
file.go#L600: switch runtime.GOOS {
file_unix.go#L184: switch runtime.GOOS {
file_unix.go#L206: if (runtime.GOOS == "darwin" || runtime.GOOS == "ios") && typ == syscall.S_IFIFO {
file_unix.go#L411: if runtime.GOOS == "android" {
file_unix.go#L453: if (runtime.GOOS == "aix" || runtime.GOOS == "wasip1") && err == syscall.ERANGE {
getwd.go#L27: if runtime.GOOS == "windows" || runtime.GOOS == "plan9" {
pidfd_linux.go#L150: if runtime.GOOS == "android" {
proc.go#L19: if runtime.GOOS == "windows" {
root.go#L198: if runtime.GOOS == "windows" {
root.go#L314: if runtime.GOOS == "windows" {
sys_linux.go#L31: if runtime.GOOS == "android" {
os/exec
exec.go#L451: } else if runtime.GOOS == "windows" && filepath.IsAbs(name) {
exec.go#L663: if runtime.GOOS == "windows" {
exec.go#L1201: switch runtime.GOOS {
exec.go#L1244: return dedupEnvCase(runtime.GOOS == "windows", runtime.GOOS == "plan9", env)
exec.go#L1307: if runtime.GOOS != "windows" {
path/filepath
match.go#L102: if runtime.GOOS != "windows" {
match.go#L187: if runtime.GOOS != "windows" {
match.go#L217: if chunk[0] == '\\' && runtime.GOOS != "windows" {
match.go#L267: if runtime.GOOS == "windows" {
match.go#L366: if runtime.GOOS != "windows" {
symlink.go#L38: isWindowsDot := runtime.GOOS == "windows" && path[filepathlite.VolumeNameLen(path):] == "."
reflect
type.go#L1120: if i < 256 && runtime.GOOS != "js" && runtime.GOOS != "wasip1" {
syscall
dirent.go#L77: if ino == 0 && runtime.GOOS != "wasip1" { // File absent in directory.
env_unix.go#L102: if runtime.GOOS != "plan9" {
exec_unix.go#L171: if (runtime.GOOS == "freebsd" || runtime.GOOS == "dragonfly") && len(argv) > 0 && len(argv[0]) > len(argv0) {
exec_unix.go#L294: if runtime.GOOS == "solaris" || runtime.GOOS == "illumos" || runtime.GOOS == "aix" {
exec_unix.go#L300: } else if runtime.GOOS == "darwin" || runtime.GOOS == "ios" {
exec_unix.go#L303: } else if runtime.GOOS == "openbsd" && runtime.GOARCH != "mips64" {
sockcmsg_unix_other.go#L19: switch runtime.GOOS {
sockcmsg_unix_other.go#L36: if runtime.GOOS == "netbsd" && runtime.GOARCH == "arm64" {
syscall_linux.go#L170: if runtime.GOOS != "android" {
syscall_unix.go#L29: darwin64Bit = (runtime.GOOS == "darwin" || runtime.GOOS == "ios") && sizeofPtr == 8
syscall_unix.go#L30: netbsd32Bit = runtime.GOOS == "netbsd" && sizeofPtr == 4
testing
benchmark.go#L277: fmt.Fprintf(b.w, "goos: %s\n", runtime.GOOS)
benchmark.go#L829: fmt.Printf("goos: %s\n", runtime.GOOS)
example.go#L70: if runtime.GOOS == "windows" {
testing.go#L1363: switch runtime.GOOS {
testing.go#L2450: if runtime.GOOS == "windows" && len(path) >= 2 {
time
sys_unix.go#L22: if runtime.GOOS != "wasip1" {
zoneinfo_read.go#L272: if runtime.GOOS == "aix" && len(name) > 8 && (name[:8] == "Etc/GMT+" || name[:8] == "Etc/GMT-") {
vendor/golang.org/x/sys/cpu
cpu_x86.go#L94: if runtime.GOOS == "darwin" {