github.com/mutagen-io/mutagen@v0.18.0-rc1/pkg/url/forwarding/protocol.go (about) 1 package forwarding 2 3 // IsValidProtocol returns whether or not the specified protocol is valid for 4 // use in forwarding (either as a from or to address). 5 func IsValidProtocol(protocol string) bool { 6 switch protocol { 7 case "tcp": 8 return true 9 case "tcp4": 10 return true 11 case "tcp6": 12 return true 13 case "unix": 14 return true 15 case "npipe": 16 return true 17 default: 18 return false 19 } 20 }