README: Simplify droplet list (#344)

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>

Co-authored-by: Andrew Starr-Bochicchio <andrewsomething@users.noreply.github.com>
This commit is contained in:
Julien Pivotto 2020-07-14 22:03:08 +02:00 committed by GitHub
parent 628e39385f
commit 6e49639328
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -98,9 +98,7 @@ func DropletList(ctx context.Context, client *godo.Client) ([]godo.Droplet, erro
}
// append the current page's droplets to our list
for _, d := range droplets {
list = append(list, d)
}
list = append(list, d...)
// if we are at the last page, break out the for loop
if resp.Links == nil || resp.Links.IsLastPage() {