sing/common/metadata/network.go
2022-07-20 22:04:12 +08:00

10 lines
186 B
Go

package metadata
import "net/netip"
func NetworkFromNetAddr(network string, addr netip.Addr) string {
if addr == netip.IPv4Unspecified() {
return network + "4"
}
return network
}