func (h *Handler) Export(userID int64) (string, error) {
	feeds, err := h.store.Feeds(userID)
	if err != nil {
		return "", err
	}
	var subscriptions SubcriptionList
	for _, feed := range feeds {
		subscriptions = append(subscriptions, &Subcription{
			Title:        feed.Title,
			FeedURL:      feed.FeedURL,
			SiteURL:      feed.SiteURL,
			CategoryName: feed.Category.Title,
		})
	}
	return Serialize(subscriptions), nil
}
Export exports user feeds to OPML.
package opml  
import (
	"errors"
	"fmt"
	"io"
	"miniflux.app/logger"
	"miniflux.app/model"
	"miniflux.app/storage"
)
type Handler struct {
	store *storage.Storage
}