converter

package
v0.0.0-...-da72c03 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CSVConverter

type CSVConverter struct{}

func (*CSVConverter) ConvertTo

func (c *CSVConverter) ConvertTo(csvData [][]string) ([]map[string]string, error)

func (*CSVConverter) Read

func (c *CSVConverter) Read(csvPath string) ([][]string, error)

func (*CSVConverter) WriteTo

func (c *CSVConverter) WriteTo(jsonData interface{}, jsonPath string) error

type JSONConverter

type JSONConverter struct{}

func (*JSONConverter) ConvertTo

func (j *JSONConverter) ConvertTo(jsonData []map[string]string) [][]string

func (*JSONConverter) ConvertWithOrder

func (j *JSONConverter) ConvertWithOrder(jsonData []map[string]string, headerKeys []string) [][]string

ConvertWithOrder be used when you need specific order with header or only need specific columns.

func (*JSONConverter) Read

func (j *JSONConverter) Read(jsonPath string) ([]map[string]string, error)

func (*JSONConverter) WriteTo

func (j *JSONConverter) WriteTo(csvData [][]string, csvPath string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL