Closed mdlayher closed 5 years ago
I agree, remove it. It simplifies the code, both because of less code and because I don't expect anyone would ever use DeviceByIndex via wireguardctrl.
SGTM, I think I'll just do it. Anybody who cares about interface index can do a lookup on their own and then use Device(name string)
. :)
This function is arguably less friendly than
Client.DeviceByName
. On top of this, there is no concept of an interface index in the userspace interface, so inwguser
, it is implemented by callingnet.InterfaceByIndex
and thenClient.DeviceByName
immediately after.Removing this function also means that the method
Client.DeviceByName
could be shortened to justClient.Device
.