src/os: export correct values for os.DevNull for each OS

This commit introduces `os.DevNull` exports for all supported OS
targets.
This commit is contained in:
ZauberNerd
2022-03-04 21:14:06 +00:00
committed by Ron Evans
parent b176494e44
commit 3f69c32a55
4 changed files with 9 additions and 2 deletions
+5
View File
@@ -1,6 +1,9 @@
//go:build darwin || (linux && !baremetal)
// +build darwin linux,!baremetal
// target wasi sets GOOS=linux and thus the +linux build tag,
// even though it doesn't show up in "tinygo info target -wasi"
// Portions copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
@@ -12,6 +15,8 @@ import (
"syscall"
)
const DevNull = "/dev/null"
type syscallFd = int
// fixLongPath is a noop on non-Windows platforms.