summaryrefslogtreecommitdiffhomepage
path: root/tun
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2021-02-17 22:19:27 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2021-02-17 22:19:27 +0100
commit8bf4204d2ea388e662bd58950c2f4a61b8f92b01 (patch)
tree9a17c2cf9a9d7fb6f32ec2b60c1fc91585ed9d01 /tun
parent4e439ea10e327d4894a5d2db2611e1fd03f54188 (diff)
global: stop using ioutil
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'tun')
-rw-r--r--tun/tun_darwin.go3
-rw-r--r--tun/tun_openbsd.go3
2 files changed, 2 insertions, 4 deletions
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)
}
}