aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ui/tunnelspage.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2021-01-29 01:48:06 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2021-02-01 16:55:02 +0100
commitfdf117deebe23b32bb4cdd4f84abb072dc4eb0cd (patch)
tree6ffa20f6a25e5f7ab76e2fbf49f2c08068587c92 /ui/tunnelspage.go
parentconf: don't sleep before failure in dns resolution (diff)
downloadwireguard-windows-fdf117deebe23b32bb4cdd4f84abb072dc4eb0cd.tar.xz
wireguard-windows-fdf117deebe23b32bb4cdd4f84abb072dc4eb0cd.zip
global: move away from ioutil
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to '')
-rw-r--r--ui/tunnelspage.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/ui/tunnelspage.go b/ui/tunnelspage.go
index f8eba2ef..10bf2f8e 100644
--- a/ui/tunnelspage.go
+++ b/ui/tunnelspage.go
@@ -9,7 +9,7 @@ import (
"archive/zip"
"errors"
"fmt"
- "io/ioutil"
+ "io"
"os"
"path/filepath"
"sort"
@@ -297,7 +297,7 @@ func (tp *TunnelsPage) importFiles(paths []string) {
for _, path := range paths {
switch strings.ToLower(filepath.Ext(path)) {
case ".conf":
- textConfig, err := ioutil.ReadFile(path)
+ textConfig, err := os.ReadFile(path)
if err != nil {
lastErr = err
continue
@@ -321,7 +321,7 @@ func (tp *TunnelsPage) importFiles(paths []string) {
lastErr = err
continue
}
- textConfig, err := ioutil.ReadAll(rc)
+ textConfig, err := io.ReadAll(rc)
rc.Close()
if err != nil {
lastErr = err