diffs: - full diff:af34b94a78...6c0a036dce- full diff:4d1f260e84...v0.8.0-rc2 New dependencies: - go.opencensus.io v0.22.3 - github.com/containerd/typeurl v1.0.1 - github.com/golang/groupcache 869f871628b6baa9cfbc11732cdf6546b17c1298 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
21 lines
383 B
Go
21 lines
383 B
Go
// +build !windows
|
|
|
|
package client
|
|
|
|
import (
|
|
"context"
|
|
"net"
|
|
"strings"
|
|
|
|
"github.com/pkg/errors"
|
|
)
|
|
|
|
func dialer(ctx context.Context, address string) (net.Conn, error) {
|
|
addrParts := strings.SplitN(address, "://", 2)
|
|
if len(addrParts) != 2 {
|
|
return nil, errors.Errorf("invalid address %s", address)
|
|
}
|
|
var d net.Dialer
|
|
return d.DialContext(ctx, addrParts[0], addrParts[1])
|
|
}
|