csvtoolkit: github.com/morcmarc/csvtoolkit/converter Index | Files

package converter

import "github.com/morcmarc/csvtoolkit/converter"

The converter package handles conversion between csv and json


Package Files

converter.go schema.go

type Converter Uses

type Converter struct {
    // contains filtered or unexported fields

func NewConverter Uses

func NewConverter(csvInput *os.File, jsonOutput *os.File) *Converter

Returns a new Converter for the given input and output

func (*Converter) Run Uses

func (c *Converter) Run()

Processes the input and writes converted objects onto the output

type Schema Uses

type Schema struct {
    Fields  []string
    TypeMap map[string]interface{}

func NewSchema Uses

func NewSchema(fields []string, typeMap map[string]interface{}) *Schema

func (*Schema) Convert Uses

func (r *Schema) Convert(line []string) map[string]interface{}

Package converter imports 8 packages (graph) and is imported by 2 packages. Updated 2016-07-14. Refresh now. Tools for package owners.