tun: remove TUN prefix from types to reduce stutter elsewhere

Signed-off-by: Matt Layher <mdlayher@gmail.com>
This commit is contained in:
Matt Layher
2019-06-10 17:33:40 -04:00
committed by Jason A. Donenfeld
parent 3371f8dac6
commit 1f48971a80
10 changed files with 66 additions and 67 deletions

View File

@@ -86,7 +86,7 @@ type Device struct {
}
tun struct {
device tun.TUNDevice
device tun.Device
mtu int32
}
}
@@ -252,7 +252,7 @@ func (device *Device) SetPrivateKey(sk NoisePrivateKey) error {
return nil
}
func NewDevice(tunDevice tun.TUNDevice, logger *Logger) *Device {
func NewDevice(tunDevice tun.Device, logger *Logger) *Device {
device := new(Device)
device.isUp.Set(false)
@@ -324,7 +324,6 @@ func (device *Device) LookupPeer(pk NoisePublicKey) *Peer {
func (device *Device) RemovePeer(key NoisePublicKey) {
device.peers.Lock()
defer device.peers.Unlock()
// stop peer and remove from routing
peer, ok := device.peers.keyMap[key]