Fix nix builds: go dependencies are awful
This commit is contained in:
20
netforward/netforward.go
Normal file
20
netforward/netforward.go
Normal file
@@ -0,0 +1,20 @@
|
||||
// From https://github.com/goburrow/netforward
|
||||
package netforward
|
||||
|
||||
import (
|
||||
"net"
|
||||
)
|
||||
|
||||
// Dialer dials to a remote address.
|
||||
type Dialer interface {
|
||||
Dial() (net.Conn, error)
|
||||
}
|
||||
|
||||
func IsPacketNetwork(network string) bool {
|
||||
switch network {
|
||||
case "udp", "udp4", "udp6", "ip", "ip4", "ip6", "unixgram":
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user