Skip to content

Commit

Permalink
Merge pull request #274 from aqche/digitalocean_projects_pagination
Browse files Browse the repository at this point in the history
Update DigitalOcean Projects Pagination
  • Loading branch information
sergeylanzman committed Nov 7, 2019
2 parents b9e8eb6 + d081c12 commit 0b48391
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ require (
github.com/cenkalti/backoff v2.2.1+incompatible // indirect
github.com/cloudflare/cloudflare-go v0.10.4
github.com/denverdino/aliyungo v0.0.0-20190924033012-e8e08fe22cb2
github.com/digitalocean/godo v1.22.0
github.com/digitalocean/godo v1.24.1
github.com/dollarshaveclub/new-relic-synthetics-go v0.0.0-20170605224734-4dc3dd6ae884
github.com/go-resty/resty v0.0.0-00010101000000-000000000000 // indirect
github.com/gogo/protobuf v1.3.0 // indirect
Expand Down Expand Up @@ -61,6 +61,7 @@ require (
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e // indirect
golang.org/x/sys v0.0.0-20191010194322-b09406accb47 // indirect
golang.org/x/text v0.3.2
golang.org/x/tools v0.0.0-20191010201905-e5ffc44a6fee // indirect
google.golang.org/api v0.11.0
google.golang.org/appengine v1.6.5 // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumC
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/digitalocean/godo v1.22.0 h1:bVFBKXW2TlynZ9SqmlM6ZSW6UPEzFckltSIUT5NC8L4=
github.com/digitalocean/godo v1.22.0/go.mod h1:iJnN9rVu6K5LioLxLimlq0uRI+y/eAQjROUmeU/r0hY=
github.com/digitalocean/godo v1.24.1 h1:XvXU0Hf85h9Eo7GtVuU4I49IFOYwTxo4nfi4mgbJFIY=
github.com/digitalocean/godo v1.24.1/go.mod h1:iJnN9rVu6K5LioLxLimlq0uRI+y/eAQjROUmeU/r0hY=
github.com/dimchansky/utfbom v1.0.0 h1:fGC2kkf4qOoKqZ4q7iIh+Vef4ubC1c38UDsEyZynZPc=
github.com/dimchansky/utfbom v1.0.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8=
github.com/dimchansky/utfbom v1.1.0 h1:FcM3g+nofKgUteL8dm/UpdRXNC9KmADgTpLKsu0TRo4=
Expand Down
2 changes: 1 addition & 1 deletion providers/digitalocean/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func (g ProjectGenerator) listProjects(ctx context.Context, client *godo.Client)
}

// if we are at the last page, break out the for loop
if resp.Links == nil || resp.Links.Pages == nil || resp.Links.Pages.Next == "" {
if resp.Links == nil || resp.Links.IsLastPage() {
break
}

Expand Down

0 comments on commit 0b48391

Please sign in to comment.