Browse Source

style: refine code style

AkinoKaede 2 years ago
parent
commit
f39b046e03
2 changed files with 3 additions and 3 deletions
  1. 1 1
      app/tun/device/device.go
  2. 2 2
      app/tun/tun.go

+ 1 - 1
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)

+ 2 - 2
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,
 	})