Closed emmggi closed 4 years ago
I've tried in a few different ways. Like for example:
mp := make(map[string]string) harvest, err := bot.ListingWithParams("/" + rippingType + "/" + rippingIdentifier, mp) mp["after"] = lastPostId mp["sort"] = "newest" (as well as "new")
then saw in the rsort package there is a Sorter struct then tried this:
type Sorter interface { Sort(h reddit.Harvest) []string } var p Sorter newHarvest := Sorter.Sort(p, harvest)
and
type Sorter interface { Sort(h reddit.Harvest) []string } newSorter := reddit.Sorter.New() newHarvest := Sorter.Sort(newSorter, harvest)
but of course i'm missing something here as well. Unless you can't sort a listing?
I've tried in a few different ways. Like for example:
then saw in the rsort package there is a Sorter struct then tried this:
and
but of course i'm missing something here as well. Unless you can't sort a listing?