From f39b046e03b95ea90f43c6526aa76173e0d3803c Mon Sep 17 00:00:00 2001 From: AkinoKaede Date: Sun, 28 May 2023 15:20:06 +0800 Subject: [PATCH] style: refine code style --- app/tun/device/device.go | 2 +- app/tun/tun.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/tun/device/device.go b/app/tun/device/device.go index ec4cd0b21..2bbb72802 100644 --- a/app/tun/device/device.go +++ b/app/tun/device/device.go @@ -16,4 +16,4 @@ type Options struct { MTU uint32 } -type DeviceCreator func(Options) (Device, error) +type DeviceConstructor func(Options) (Device, error) diff --git a/app/tun/tun.go b/app/tun/tun.go index b78787ef0..b40674e66 100644 --- a/app/tun/tun.go +++ b/app/tun/tun.go @@ -31,8 +31,8 @@ func (t *TUN) Type() interface{} { } func (t *TUN) Start() error { - DeviceCreator := tun.New - device, err := DeviceCreator(device.Options{ + DeviceConstructor := tun.New + device, err := DeviceConstructor(device.Options{ Name: t.config.Name, MTU: t.config.Mtu, })