This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
dagger/solver/socketprovider_unix.go
Sam Alba d46a347781 solver: split platform specific code
Signed-off-by: Sam Alba <samalba@users.noreply.github.com>
2021-11-08 17:51:40 -08:00

21 lines
347 B
Go

//go:build !windows
// +build !windows
package solver
import (
"fmt"
"net"
"strings"
"time"
)
func dialStream(id string) (net.Conn, error) {
if !strings.HasPrefix(id, unixPrefix) {
return nil, fmt.Errorf("invalid socket forward key %s", id)
}
id = strings.TrimPrefix(id, unixPrefix)
return net.DialTimeout("unix", id, time.Second)
}