Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CI #1631

Merged
merged 1 commit into from
Aug 18, 2022
Merged

Fix CI #1631

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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