ipv6: make not implemented errors more descriptive

Change-Id: I4710227d104330fa28a563530bd93a3ae8a6c070
Reviewed-on: https://go-review.googlesource.com/c/149877
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Mikio Hara
2018-11-16 17:37:45 +09:00
parent d6388d9676
commit d76a190299
2 changed files with 4 additions and 6 deletions

View File

@@ -4,13 +4,9 @@
package ipv6
import (
"syscall"
"golang.org/x/net/internal/socket"
)
import "golang.org/x/net/internal/socket"
func setControlMessage(c *socket.Conn, opt *rawOpt, cf ControlFlags, on bool) error {
// TODO(mikio): implement this
return syscall.EWINDOWS
return errNotImplemented
}

View File

@@ -7,6 +7,7 @@ package ipv6
import (
"errors"
"net"
"runtime"
)
var (
@@ -16,6 +17,7 @@ var (
errInvalidConnType = errors.New("invalid conn type")
errOpNoSupport = errors.New("operation not supported")
errNoSuchInterface = errors.New("no such interface")
errNotImplemented = errors.New("not implemented on " + runtime.GOOS + "/" + runtime.GOARCH)
)
func boolint(b bool) int {