From 6e49639328541b063131f64fccabb6680e523fcc Mon Sep 17 00:00:00 2001 From: Julien Pivotto Date: Tue, 14 Jul 2020 22:03:08 +0200 Subject: [PATCH] README: Simplify droplet list (#344) Signed-off-by: Julien Pivotto Co-authored-by: Andrew Starr-Bochicchio --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index cadeb69..dbaf2f5 100644 --- a/README.md +++ b/README.md @@ -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() {