Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upwireguardctrl: consider eliminating Client.DeviceByIndex #6
Comments
This comment has been minimized.
This comment has been minimized.
olemd
commented
Aug 10, 2018
|
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. |
This comment has been minimized.
This comment has been minimized.
|
SGTM, I think I'll just do it. Anybody who cares about interface index can do a lookup on their own and then use |
mdlayher
referenced this issue
Aug 10, 2018
Merged
*: remove Client.DeviceByIndex, rename name lookup to Client.Device #12
mdlayher
closed this
in
#12
Aug 10, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
mdlayher commentedAug 7, 2018
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.InterfaceByIndexand thenClient.DeviceByNameimmediately after.Removing this function also means that the method
Client.DeviceByNamecould be shortened to justClient.Device.