const runtime.GOOS
181 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#L386: const GOOS string = goos.GOOS
malloc.go#L531: case GOARCH == "arm64" && GOOS == "ios":
malloc.go#L535: case GOOS == "aix":
malloc.go#L855: case GOOS == "windows":
mheap.go#L55: physPageAlignedStacks = GOOS == "openbsd"
netpoll.go#L348: if GOOS == "solaris" || GOOS == "illumos" || GOOS == "aix" || GOOS == "wasip1" {
panic.go#L1487: if GOOS == "windows" && mp.libcallsp != 0 {
proc.go#L224: if GOOS != "windows" {
proc.go#L650: const crashStackImplemented = GOOS != "windows"
proc.go#L759: switch GOOS {
proc.go#L797: switch GOOS {
proc.go#L1030: if iscgo || GOOS == "solaris" || GOOS == "illumos" || GOOS == "windows" {
proc.go#L1105: osHasLowResTimer = GOOS == "windows" || GOOS == "openbsd" || GOOS == "netbsd"
proc.go#L1835: switch GOOS {
proc.go#L1847: switch GOOS {
proc.go#L1962: if (iscgo || GOOS == "windows") && !cgoHasExtraM {
proc.go#L2076: if GOOS == "darwin" || GOOS == "ios" {
proc.go#L2401: if (iscgo || GOOS == "windows") && !cgoHasExtraM {
proc.go#L2697: if GOOS == "windows" || GOOS == "plan9" {
proc.go#L2878: if gp := getg(); gp != nil && gp.m != nil && (gp.m.lockedExt != 0 || gp.m.incgo) && GOOS != "plan9" {
proc.go#L4003: if GOOS != "plan9" { // Temporary workaround - see issue #42303.
proc.go#L4508: if GOOS != "plan9" { // See golang.org/issue/22227.
proc.go#L5121: if GOOS == "darwin" || GOOS == "ios" {
proc.go#L5479: if atomic.Load(&newmHandoff.haveTemplateThread) == 0 && GOOS != "plan9" {
proc.go#L5617: if GOARCH == "arm" && goarm < 7 && GOOS == "linux" && pc&0xffff0000 == 0xffff0000 {
proc.go#L6328: if GOOS == "netbsd" && needSysmonWorkaround {
runtime1.go#L74: if GOOS == "windows" {
runtime1.go#L410: if GOOS == "linux" {
runtime1.go#L573: 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#L489: if GOOS == "plan9" {
symtab.go#L641: if GOOS == "aix" && isarchive {
tagptr_64bit.go#L79: if GOOS == "aix" {
traceback.go#L190: if GOARCH == "arm" && goarm < 7 && GOOS == "linux" && frame.pc&0xffff0000 == 0xffff0000 {
type.go#L112: 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#L838: 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#L751: 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#L192: 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#L67: 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#L4731: if runtime.GOOS == "windows" {
os
dir_unix.go#L115: if ino == 0 && runtime.GOOS != "wasip1" {
eloop_other.go#L20: if runtime.GOOS == "dragonfly" {
exec.go#L277: if runtime.GOOS != "windows" {
exec.go#L285: if runtime.GOOS == "windows" {
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#L366: if runtime.GOOS == "windows" {
file.go#L510: switch runtime.GOOS {
file.go#L563: switch runtime.GOOS {
file.go#L610: switch runtime.GOOS {
file.go#L620: switch runtime.GOOS {
file_unix.go#L165: switch runtime.GOOS {
file_unix.go#L187: if (runtime.GOOS == "darwin" || runtime.GOOS == "ios") && typ == syscall.S_IFIFO {
file_unix.go#L392: if runtime.GOOS == "android" {
file_unix.go#L434: if (runtime.GOOS == "aix" || runtime.GOOS == "wasip1") && err == syscall.ERANGE {
getwd.go#L27: if runtime.GOOS == "windows" || runtime.GOOS == "plan9" {
pidfd_linux.go#L158: if runtime.GOOS == "android" {
proc.go#L19: if runtime.GOOS == "windows" {
removeall_at.go#L39: if runtime.GOOS == "windows" {
root.go#L309: if runtime.GOOS == "windows" {
root.go#L441: 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#L1129: 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#L99: 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#L166: 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#L844: fmt.Printf("goos: %s\n", runtime.GOOS)
example.go#L64: if runtime.GOOS == "windows" {
testing.go#L1465: switch runtime.GOOS {
testing.go#L2648: 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#L97: if runtime.GOOS == "darwin" {