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:
parent
628e39385f
commit
6e49639328
|
@ -98,9 +98,7 @@ func DropletList(ctx context.Context, client *godo.Client) ([]godo.Droplet, erro
|
||||||
}
|
}
|
||||||
|
|
||||||
// append the current page's droplets to our list
|
// 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 we are at the last page, break out the for loop
|
||||||
if resp.Links == nil || resp.Links.IsLastPage() {
|
if resp.Links == nil || resp.Links.IsLastPage() {
|
||||||
|
|
Loading…
Reference in New Issue