Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
Signed-off-by: Manuel Buil <[email protected]>
  • Loading branch information
manuelbuil committed Aug 18, 2022
1 parent 45aafa8 commit baf976a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions backend/gce/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package gce

import (
"io/ioutil"
"io"
"net/http"
"path"
"strings"
Expand Down Expand Up @@ -69,7 +69,7 @@ func metadataGet(path string) (string, error) {
return "", err
}
defer resp.Body.Close()
data, err := ioutil.ReadAll(resp.Body)
data, err := io.ReadAll(resp.Body)
if err != nil {
return "", err
}
Expand Down
4 changes: 2 additions & 2 deletions backend/tencentvpc/tencentvpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package tencentvpc
import (
"encoding/json"
"fmt"
"io/ioutil"
"io"
"net/http"
"os"
"sync"
Expand Down Expand Up @@ -60,7 +60,7 @@ func get_vm_metadata(url string) (string, error) {

defer resp.Body.Close()

metadata, _ := ioutil.ReadAll(resp.Body)
metadata, _ := io.ReadAll(resp.Body)
return string(metadata), nil
}

Expand Down
3 changes: 1 addition & 2 deletions backend/wireguard/device.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package wireguard
import (
"errors"
"fmt"
"io/ioutil"
"net"
"os"
"path/filepath"
Expand Down Expand Up @@ -100,7 +99,7 @@ func (devAttrs *wgDeviceAttrs) setupKeys(psk string) error {
return fmt.Errorf("could not write key file: %w", err)
}
} else {
data, err := ioutil.ReadFile(keyFile)
data, err := os.ReadFile(keyFile)
if err != nil {
return err
}
Expand Down
3 changes: 1 addition & 2 deletions subnet/kube/kube.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import (
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"net"
"os"
"strconv"
Expand Down Expand Up @@ -101,7 +100,7 @@ func NewSubnetManager(ctx context.Context, apiUrl, kubeconfig, prefix, netConfPa
}
}

netConf, err := ioutil.ReadFile(netConfPath)
netConf, err := os.ReadFile(netConfPath)
if err != nil {
return nil, fmt.Errorf("failed to read net conf: %v", err)
}
Expand Down

0 comments on commit baf976a

Please sign in to comment.