
Move io copy logic from ctr utils to io_windows.go. Fix compilation errors on Windows. Signed-off-by: Derek McGowan <derek@mcgstyle.net>
20 lines
345 B
Go
20 lines
345 B
Go
// +build !windows
|
|
|
|
package containerd
|
|
|
|
import (
|
|
"fmt"
|
|
"net"
|
|
"strings"
|
|
"time"
|
|
)
|
|
|
|
func dialer(address string, timeout time.Duration) (net.Conn, error) {
|
|
address = strings.TrimPrefix(address, "unix://")
|
|
return net.DialTimeout("unix", address, timeout)
|
|
}
|
|
|
|
func dialAddress(address string) string {
|
|
return fmt.Sprintf("unix://%s", address)
|
|
}
|