From b4690f45fa1cafc47b1c280c2e75116efe40cc13 Mon Sep 17 00:00:00 2001 From: Mikio Hara Date: Wed, 15 Feb 2017 17:41:58 +0900 Subject: [PATCH] internal/netreflect: don't build on go1.9 or above This package doesn't work with Go 1.9 or above. The bypass surgery for grafting the net and internal/poll packages of Go 1.9 starts with disabling this packge. Updates golang/go#19051. Change-Id: I82d742d267f155cf440884e845b24402a5a5bfdf Reviewed-on: https://go-review.googlesource.com/37034 Reviewed-by: Ian Lance Taylor --- internal/netreflect/socket.go | 4 ++++ internal/netreflect/socket_posix.go | 1 + internal/netreflect/socket_stub.go | 1 + internal/netreflect/socket_test.go | 1 + 4 files changed, 7 insertions(+) diff --git a/internal/netreflect/socket.go b/internal/netreflect/socket.go index e82e51c4..1495b65f 100644 --- a/internal/netreflect/socket.go +++ b/internal/netreflect/socket.go @@ -2,8 +2,12 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// +build !go1.9 + // Package netreflect implements run-time reflection for the // facilities of net package. +// +// This package works only for Go 1.8 or below. package netreflect import ( diff --git a/internal/netreflect/socket_posix.go b/internal/netreflect/socket_posix.go index df475a2b..410c0924 100644 --- a/internal/netreflect/socket_posix.go +++ b/internal/netreflect/socket_posix.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// +build !go1.9 // +build darwin dragonfly freebsd linux netbsd openbsd solaris windows package netreflect diff --git a/internal/netreflect/socket_stub.go b/internal/netreflect/socket_stub.go index 85adb4b7..17b20c47 100644 --- a/internal/netreflect/socket_stub.go +++ b/internal/netreflect/socket_stub.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// +build !go1.9 // +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows package netreflect diff --git a/internal/netreflect/socket_test.go b/internal/netreflect/socket_test.go index fd01a9b2..b3aad0d9 100644 --- a/internal/netreflect/socket_test.go +++ b/internal/netreflect/socket_test.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// +build !go1.9 // +build darwin dragonfly freebsd linux netbsd openbsd solaris windows package netreflect_test