func (w *CSVWriter) WriteCSV(results []KeyValue) error {
	if w.Transpose {
		return w.writeTransposedCSV(results)
	}
	return w.writeCSV(results)
}
WriteCSV writes CSV data.
package json2csv
import (
	"encoding/csv"
	"io"
	"sort"
	"github.com/yukithm/json2csv/jsonpointer"
)
type KeyStyle uint
const (
	JSONPointerStyle KeyStyle = iota
	SlashStyle
	DotNotationStyle
	DotBracketStyle
)
type CSVWriter struct {
	*csv.Writer
	HeaderStyle KeyStyle
	Transpose   bool
}
func NewCSVWriter(w io.Writer) *CSVWriter {
	return &CSVWriter{
		csv.NewWriter(w),
		JSONPointerStyle,
		false,
	}
}