go-csv: github.com/wildducktheories/go-csv/utils Index | Files

package utils

import "github.com/wildducktheories/go-csv/utils"

Some additional utilities that are useful when processing CSV headers and data.

Index

Package Files

utils.go

func Intersect Uses

func Intersect(a []string, b []string) ([]string, []string, []string)

Calculate the intersection between two string slices. The first returned slice is the intersection between the two slices. The second returned slice is a slice of elements in the first slice but not the second. The third returned slice is a slice of elements in the second slice but not the first.

type Index Uses

type Index map[string]int

func NewIndex Uses

func NewIndex(a []string) Index

Return a map that maps each string in the input slice to its index in the slice.

func (Index) Contains Uses

func (i Index) Contains(k string) bool

Answer true if the index contains the specified string.

Package utils is imported by 1 packages. Updated 2016-07-21. Refresh now. Tools for package owners.