Skip to content
Snippets Groups Projects
Commit 26bb6ac1 authored by jkito's avatar jkito :skull: Committed by jkito
Browse files

remove use of deprecated ioutil module

parent 00d4e0a7
Branches
Tags
1 merge request!273fix crash during start when helper not installed
...@@ -17,7 +17,6 @@ package vpn ...@@ -17,7 +17,6 @@ package vpn
import ( import (
"encoding/json" "encoding/json"
"io/ioutil"
"os" "os"
"time" "time"
...@@ -58,7 +57,7 @@ type Bitmask struct { ...@@ -58,7 +57,7 @@ type Bitmask struct {
// Init the connection to bitmask // Init the connection to bitmask
func Init() (*Bitmask, error) { func Init() (*Bitmask, error) {
tempdir, err := ioutil.TempDir("", "leap-") tempdir, err := os.MkdirTemp("", "leap-")
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -110,7 +109,7 @@ func Init() (*Bitmask, error) { ...@@ -110,7 +109,7 @@ func Init() (*Bitmask, error) {
provider: "", provider: "",
} }
err = ioutil.WriteFile(b.getTempCaCertPath(), config.CaCert, 0600) err = os.WriteFile(b.getTempCaCertPath(), config.CaCert, 0600)
if err != nil { if err != nil {
return nil, err return nil, err
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment