import (
"encoding/json"
)
type PageFetcher interface {
GetNextPage() (total int64, list []json.RawMessage, err error)
AdjustPage(list []json.RawMessage)
HasMore() bool // called if total is 0
ErrorOccurrs(err error)
}
func FetchList(pf PageFetcher) (total int64, it <-chan json.RawMessage, err error) {
//
}
func Dump(w io.Writer, it <-chan json.RawMessage) {
//
}
func DumpJSON(w io.Writer, it <-chan json.RawMessage) {
//
}