small refactors

This commit is contained in:
0xdcarns
2022-04-25 19:28:56 -04:00
parent daa24b0dd5
commit a6ee8101e6
4 changed files with 7 additions and 8 deletions

View File

@@ -4,7 +4,7 @@ import (
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"io"
"net/http"
"os"
"runtime"
@@ -39,7 +39,7 @@ func Pull(network string, iface bool) (*models.Node, error) {
return nil, err
}
if response.StatusCode != http.StatusOK {
bytes, err := ioutil.ReadAll(response.Body)
bytes, err := io.ReadAll(response.Body)
if err != nil {
fmt.Println(err)
}