Skip to content

Commit

Permalink
empty array for hosts (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
therealpaulgg authored Mar 21, 2024
1 parent 0df3b2b commit 4d42d79
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions pkg/actions/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"errors"
"fmt"
"io"
"io/ioutil"
"mime/multipart"
"net/http"
"net/url"
Expand Down Expand Up @@ -311,7 +310,7 @@ func existingAccountSetup(serverUrl *url.URL) error {
return err
}
defer f.Close()
pubkey, err := ioutil.ReadAll(f)
pubkey, err := io.ReadAll(f)
if err != nil {
return err
}
Expand Down
5 changes: 2 additions & 3 deletions pkg/actions/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"errors"
"fmt"
"io"
"io/ioutil"
"mime/multipart"
"net/http"
"os"
Expand Down Expand Up @@ -68,7 +67,7 @@ func Upload(c *cli.Context) error {
if err != nil {
return err
}
var hosts []models.Host
hosts := []models.Host{}
for _, file := range data {
if file.IsDir() || file.Name() == "authorized_keys" {
continue
Expand All @@ -84,7 +83,7 @@ func Upload(c *cli.Context) error {
return err
}
// read file into buffer
data, err := ioutil.ReadAll(f)
data, err := io.ReadAll(f)
if err != nil {
return err
}
Expand Down

0 comments on commit 4d42d79

Please sign in to comment.