func items(fic chan FeedbackItem, resp *FeedbackResponse, f *FeedbackItems, buttonID string) {
	for {
		for _, item := range resp.Items {
			fic <- item
		}
		if !resp.HasMore {
			close(fic)
			return
		}
		params := map[string]string{
			"since": strconv.FormatInt(resp.LastTimestamp, 10),
		}

		resp, err := f.Get(buttonID, params)

		if err != nil {
			panic(err)
		}

		items(fic, resp, f, buttonID)

		return
	}
}
// items feeds a feedback item channel with items.
//
// While hasMore is true and all items have been consumed in the channel
// a new request is fired using the since parameter of the response, to
// retrieve new items.
//
// When HasMore is false, we close the channel.
items feeds a feedback item channel with items.

While hasMore is true and all items have been consumed in the channel
a new request is fired using the since parameter of the response, to
retrieve new items.

When HasMore is false, we close the channel.
// items feeds a feedback item channel with items . // // While hasMore is true and all items have been consumed in the channel // a new request is fired using the since parameter of the response to // retrieve new items . // // When HasMore is false we close the channel .
func items(fic chan FeedbackItem, resp *FeedbackResponse, f *FeedbackItems, buttonID string) {
	for {
		for _, item := range resp.Items {
			fic <- item
		}
		if !resp.HasMore {
			close(fic)
			return
		}
		params := map[string]string{
			"since": strconv.FormatInt(resp.LastTimestamp, 10),
		}
		resp, err := f.Get(buttonID, params)
		if err != nil {
			panic(err)
		}
		items(fic, resp, f, buttonID)
		return
	}
}
func items ( fic chan FeedbackItem , resp * FeedbackResponse , f * FeedbackItems , buttonID string ) { for { for _ , item := range resp . Items { fic <- item } if ! resp . HasMore { close ( fic ) return } params := map [ string ] string { " " : strconv . FormatInt ( resp . LastTimestamp , 10 ) , } resp , err := f . Get ( buttonID , params ) if err != nil { panic ( err ) } items ( fic , resp , f , buttonID ) return } }
items feeds a feedback item channel with items.
items feeds a feedback item channel with items .