mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-06-12 02:40:42 +00:00
style: refine code style
This commit is contained in:
parent
1cb3ab7f84
commit
f39b046e03
|
@ -16,4 +16,4 @@ type Options struct {
|
||||||
MTU uint32
|
MTU uint32
|
||||||
}
|
}
|
||||||
|
|
||||||
type DeviceCreator func(Options) (Device, error)
|
type DeviceConstructor func(Options) (Device, error)
|
||||||
|
|
|
@ -31,8 +31,8 @@ func (t *TUN) Type() interface{} {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *TUN) Start() error {
|
func (t *TUN) Start() error {
|
||||||
DeviceCreator := tun.New
|
DeviceConstructor := tun.New
|
||||||
device, err := DeviceCreator(device.Options{
|
device, err := DeviceConstructor(device.Options{
|
||||||
Name: t.config.Name,
|
Name: t.config.Name,
|
||||||
MTU: t.config.Mtu,
|
MTU: t.config.Mtu,
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue
Block a user