(index int)
| 1314 | } |
| 1315 | |
| 1316 | func (n *errorTurnNet) InterfaceByIndex(index int) (*transport.Interface, error) { |
| 1317 | ifaces, err := n.Interfaces() |
| 1318 | if err != nil { |
| 1319 | return nil, err |
| 1320 | } |
| 1321 | for _, iface := range ifaces { |
| 1322 | if iface.Index == index { |
| 1323 | return iface, nil |
| 1324 | } |
| 1325 | } |
| 1326 | |
| 1327 | return nil, transport.ErrInterfaceNotFound |
| 1328 | } |
| 1329 | |
| 1330 | func (n *errorTurnNet) InterfaceByName(name string) (*transport.Interface, error) { |
| 1331 | ifaces, err := n.Interfaces() |
nothing calls this directly
no test coverage detected