mirror of https://github.com/docker/compose.git
17 lines
355 B
Go
17 lines
355 B
Go
// +build !windows
|
|
|
|
package server
|
|
|
|
import (
|
|
"errors"
|
|
"net"
|
|
"strings"
|
|
)
|
|
|
|
func createLocalListener(address string) (net.Listener, error) {
|
|
if !strings.HasPrefix(address, "unix://") {
|
|
return nil, errors.New("Cannot parse address, must start with unix:// or tcp:// : " + address)
|
|
}
|
|
return net.Listen("unix", strings.TrimPrefix(address, "unix://"))
|
|
}
|