diff --git a/pkg/actions/setup.go b/pkg/actions/setup.go index 5620439..01f3a21 100644 --- a/pkg/actions/setup.go +++ b/pkg/actions/setup.go @@ -13,7 +13,6 @@ import ( "errors" "fmt" "io" - "io/ioutil" "mime/multipart" "net/http" "net/url" @@ -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 } diff --git a/pkg/actions/upload.go b/pkg/actions/upload.go index 4b7a1d1..18f3281 100644 --- a/pkg/actions/upload.go +++ b/pkg/actions/upload.go @@ -6,7 +6,6 @@ import ( "errors" "fmt" "io" - "io/ioutil" "mime/multipart" "net/http" "os" @@ -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 @@ -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 }