mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
src: make use of runtime.GOOS, GOARCH instead of syscall.OS, ARCH
R=rsc, r CC=golang-dev https://golang.org/cl/5545048
This commit is contained in:
parent
5f7337769c
commit
92c8df46c6
35 changed files with 51 additions and 83 deletions
|
|
@ -8,7 +8,6 @@ import (
|
|||
"os"
|
||||
"reflect"
|
||||
"runtime"
|
||||
"syscall"
|
||||
"testing"
|
||||
)
|
||||
|
||||
|
|
@ -67,7 +66,7 @@ func TestFileListener(t *testing.T) {
|
|||
testFileListener(t, "tcp", "127.0.0.1")
|
||||
testFileListener(t, "tcp", "[::ffff:127.0.0.1]")
|
||||
}
|
||||
if syscall.OS == "linux" {
|
||||
if runtime.GOOS == "linux" {
|
||||
testFileListener(t, "unix", "@gotest/net")
|
||||
testFileListener(t, "unixpacket", "@gotest/net")
|
||||
}
|
||||
|
|
@ -132,7 +131,7 @@ func TestFilePacketConn(t *testing.T) {
|
|||
if supportsIPv6 && supportsIPv4map {
|
||||
testFilePacketConnDial(t, "udp", "[::ffff:127.0.0.1]:12345")
|
||||
}
|
||||
if syscall.OS == "linux" {
|
||||
if runtime.GOOS == "linux" {
|
||||
testFilePacketConnListen(t, "unixgram", "@gotest1/net")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue