Remove use of ioutil package (#93)

This commit is contained in:
Dave Gallant
2023-03-01 20:56:27 -05:00
committed by GitHub
parent 3044ecef5f
commit 3510f02036
3 changed files with 6 additions and 7 deletions

View File

@@ -3,7 +3,6 @@ package cmd
import (
"encoding/base64"
"fmt"
"io/ioutil"
"math/rand"
"os"
"strings"
@@ -29,6 +28,7 @@ func init() {
var connectCmd = &cobra.Command{
Use: "connect",
Short: "Connect to a vpn server (survey selection appears if hostname is not provided)",
Long: `Connect to a vpn from a list of relay servers`,
Args: cobra.RangeArgs(0, 1),
@@ -91,7 +91,7 @@ var connectCmd = &cobra.Command{
os.Exit(1)
}
tmpfile, err := ioutil.TempFile("", "vpngate-openvpn-config-")
tmpfile, err := os.CreateTemp("", "vpngate-openvpn-config-")
if err != nil {
log.Fatal().Msgf(err.Error())
os.Exit(1)