func (li *ListsIterator) Last(ctx context.Context, items *[]MailingList) bool {
	if li.err != nil {
		return false
	}
	li.err = li.fetch(ctx, li.Paging.Last)
	if li.err != nil {
		return false
	}
	cpy := make([]MailingList, len(li.Items))
	copy(cpy, li.Items)
	*items = cpy
	return true
}
Last retrieves the last page of items from the api.
Calling Last() is invalid unless you first call First() or Next()
Returns false if there was an error. It also sets the iterator object
to the last page. Use `.Err()` to retrieve the error.
package mailgun
import (
	"context"
	"strconv"
)
const (
	AccessLevelReadOnly = "readonly"
	AccessLevelMembers = "members"
	AccessLevelEveryone = "everyone"
)
type AccessLevel string
type MailingList struct {
	Address      string      `json:"address,omitempty"`
	Name         string      `json:"name,omitempty"`
	Description  string      `json:"description,omitempty"`
	AccessLevel  AccessLevel `json:"access_level,omitempty"`
	CreatedAt    RFC2822Time `json:"created_at,omitempty"`
	MembersCount int         `json:"members_count,omitempty"`
}
type listsResponse struct {
	Items  []MailingList `json:"items"`
	Paging Paging        `json:"paging"`
}
type mailingListResponse struct {
	MailingList MailingList `json:"member"`
}
type ListsIterator struct {
	listsResponse
	mg  Mailgun
	err error
}
func (mg *MailgunImpl) ListMailingLists(opts *ListOptions) *ListsIterator {
	r := newHTTPRequest(generatePublicApiUrl(mg, listsEndpoint) + "/pages")
	r.setClient(mg.Client())
	r.setBasicAuth(basicAuthUser, mg.APIKey())
	if opts != nil {
		if opts.Limit != 0 {
			r.addParameter("limit", strconv.Itoa(opts.Limit))
		}
	}
	url, err := r.generateUrlWithParameters()
	return &ListsIterator{
		mg:            mg,
		listsResponse: listsResponse{Paging: Paging{Next: url, First: url}},
		err:           err,
	}
}
func (li *ListsIterator) Err() error {
	return li.err
}
func (li *ListsIterator) Next(ctx context.Context, items *[]MailingList) bool {
	if li.err != nil {
		return false
	}
	li.err = li.fetch(ctx, li.Paging.Next)
	if li.err != nil {
		return false
	}
	cpy := make([]MailingList, len(li.Items))
	copy(cpy, li.Items)
	*items = cpy
	if len(li.Items) == 0 {
		return false
	}
	return true
}
func (li *ListsIterator) First(ctx context.Context, items *[]MailingList) bool {
	if li.err != nil {
		return false
	}
	li.err = li.fetch(ctx, li.Paging.First)
	if li.err != nil {
		return false
	}
	cpy := make([]MailingList, len(li.Items))
	copy(cpy, li.Items)
	*items = cpy
	return true
}