(ips []net.IP)
| 100 | } |
| 101 | |
| 102 | func toNetipAddrSlice(ips []net.IP) []netip.Addr { |
| 103 | if len(ips) == 0 { |
| 104 | return nil |
| 105 | } |
| 106 | netIPs := make([]netip.Addr, 0, len(ips)) |
| 107 | for _, ip := range ips { |
| 108 | netIPs = append(netIPs, toNetipAddr(ip)) |
| 109 | } |
| 110 | return netIPs |
| 111 | } |
| 112 | |
| 113 | func toNetipAddr(ip net.IP) netip.Addr { |
| 114 | a, _ := netip.AddrFromSlice(ip) |
no test coverage detected
searching dependent graphs…