gollist

package
v0.0.0-...-1bfd785 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: MIT Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ListEngines = make(map[string]ListEngine)

Functions

func CSVToList

func CSVToList(csvalues string) []string

entertains each and every field in CSV as element of list

func CSVToNumbers

func CSVToNumbers(csvalues string) ([]int, error)

CSVmap proxy for CSVToList

func JSONToList

func JSONToList(jsonValues string) []string

entertains single depth JSON as element of list

func ListToCSV

func ListToCSV(list []string) string

convert list elements to single line CSV

func ListToJSON

func ListToJSON(list []string) string

convert list elements to single line JSON

func RegisterListEngine

func RegisterListEngine(name string, listEngine ListEngine)

Types

type CSVmap

type CSVmap struct{}

func (CSVmap) FromList

func (csvmap CSVmap) FromList(list []string) string

CSVmap proxy for ListToCSV

func (CSVmap) ToList

func (csvmap CSVmap) ToList(csvalues string) []string

CSVmap proxy for CSVToList

func (CSVmap) ToNumbers

func (csvmap CSVmap) ToNumbers(csvalues string) ([]int, error)

CSVmap proxy for CSVToNumbers

type JSONmap

type JSONmap struct{}

func (JSONmap) FromList

func (jsonmap JSONmap) FromList(list []string) string

JSONmap proxy for ListToJSON

func (JSONmap) ToList

func (jsonmap JSONmap) ToList(jsonValues string) []string

JSONmap proxy for JSONToList

type List

type List []string

type ListEngine

type ListEngine interface {
	ToList(data string) []string
	FromList(list []string) string
}

func GetListEngine

func GetListEngine(name string) ListEngine

Jump to

Keyboard shortcuts

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