Bumping k8s dependencies to 1.13

This commit is contained in:
Cheng Xing
2018-11-16 14:08:25 -08:00
parent 305407125c
commit b4c0b68ec7
8002 changed files with 884099 additions and 276228 deletions

View File

@@ -7,7 +7,6 @@ package icmp
import (
"net"
"runtime"
"syscall"
"time"
"golang.org/x/net/ipv4"
@@ -47,7 +46,7 @@ func (c *PacketConn) IPv6PacketConn() *ipv6.PacketConn {
// ReadFrom reads an ICMP message from the connection.
func (c *PacketConn) ReadFrom(b []byte) (int, net.Addr, error) {
if !c.ok() {
return 0, nil, syscall.EINVAL
return 0, nil, errInvalidConn
}
// Please be informed that ipv4.NewPacketConn enables
// IP_STRIPHDR option by default on Darwin.
@@ -60,11 +59,12 @@ func (c *PacketConn) ReadFrom(b []byte) (int, net.Addr, error) {
}
// WriteTo writes the ICMP message b to dst.
// Dst must be net.UDPAddr when c is a non-privileged
// datagram-oriented ICMP endpoint. Otherwise it must be net.IPAddr.
// The provided dst must be net.UDPAddr when c is a non-privileged
// datagram-oriented ICMP endpoint.
// Otherwise it must be net.IPAddr.
func (c *PacketConn) WriteTo(b []byte, dst net.Addr) (int, error) {
if !c.ok() {
return 0, syscall.EINVAL
return 0, errInvalidConn
}
return c.c.WriteTo(b, dst)
}
@@ -72,7 +72,7 @@ func (c *PacketConn) WriteTo(b []byte, dst net.Addr) (int, error) {
// Close closes the endpoint.
func (c *PacketConn) Close() error {
if !c.ok() {
return syscall.EINVAL
return errInvalidConn
}
return c.c.Close()
}
@@ -89,7 +89,7 @@ func (c *PacketConn) LocalAddr() net.Addr {
// endpoint.
func (c *PacketConn) SetDeadline(t time.Time) error {
if !c.ok() {
return syscall.EINVAL
return errInvalidConn
}
return c.c.SetDeadline(t)
}
@@ -98,7 +98,7 @@ func (c *PacketConn) SetDeadline(t time.Time) error {
// endpoint.
func (c *PacketConn) SetReadDeadline(t time.Time) error {
if !c.ok() {
return syscall.EINVAL
return errInvalidConn
}
return c.c.SetReadDeadline(t)
}
@@ -107,7 +107,7 @@ func (c *PacketConn) SetReadDeadline(t time.Time) error {
// endpoint.
func (c *PacketConn) SetWriteDeadline(t time.Time) error {
if !c.ok() {
return syscall.EINVAL
return errInvalidConn
}
return c.c.SetWriteDeadline(t)
}