add ipv4-only support for listener
This commit is contained in:
5
internal/net/net.go
Normal file
5
internal/net/net.go
Normal file
@ -0,0 +1,5 @@
|
||||
package net
|
||||
|
||||
func IsIPv4(address string) bool {
|
||||
return address != "" && address[0] != ':' && address[0] != '['
|
||||
}
|
Reference in New Issue
Block a user