diff options
-rw-r--r-- | device/device_test.go | 4 | ||||
-rw-r--r-- | tun/tun_darwin.go | 3 | ||||
-rw-r--r-- | tun/tun_openbsd.go | 3 |
3 files changed, 4 insertions, 6 deletions
diff --git a/device/device_test.go b/device/device_test.go index 02b1c35..7958fb9 100644 --- a/device/device_test.go +++ b/device/device_test.go @@ -10,7 +10,7 @@ import ( "encoding/hex" "errors" "fmt" - "io/ioutil" + "io" "math/rand" "net" "runtime" @@ -402,7 +402,7 @@ func BenchmarkUAPIGet(b *testing.B) { b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { - pair[0].dev.IpcGetOperation(ioutil.Discard) + pair[0].dev.IpcGetOperation(io.Discard) } } diff --git a/tun/tun_darwin.go b/tun/tun_darwin.go index f513d03..542f666 100644 --- a/tun/tun_darwin.go +++ b/tun/tun_darwin.go @@ -8,7 +8,6 @@ package tun import ( "errors" "fmt" - "io/ioutil" "net" "os" "syscall" @@ -138,7 +137,7 @@ func CreateTUN(name string, mtu int) (Device, error) { if err == nil && name == "utun" { fname := os.Getenv("WG_TUN_NAME_FILE") if fname != "" { - ioutil.WriteFile(fname, []byte(tun.(*NativeTun).name+"\n"), 0400) + os.WriteFile(fname, []byte(tun.(*NativeTun).name+"\n"), 0400) } } diff --git a/tun/tun_openbsd.go b/tun/tun_openbsd.go index b2815d7..8fca1e3 100644 --- a/tun/tun_openbsd.go +++ b/tun/tun_openbsd.go @@ -8,7 +8,6 @@ package tun import ( "errors" "fmt" - "io/ioutil" "net" "os" "syscall" @@ -132,7 +131,7 @@ func CreateTUN(name string, mtu int) (Device, error) { if err == nil && name == "tun" { fname := os.Getenv("WG_TUN_NAME_FILE") if fname != "" { - ioutil.WriteFile(fname, []byte(tun.(*NativeTun).name+"\n"), 0400) + os.WriteFile(fname, []byte(tun.(*NativeTun).name+"\n"), 0400) } } |