utils

package
v0.0.0-...-8745000 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2021 License: LGPL-3.0 Imports: 0 Imported by: 3

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Intersect

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.

Types

type Index

type Index map[string]int

func NewIndex

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

func (i Index) Contains(k string) bool

Answer true if the index contains the specified string.

Jump to

Keyboard shortcuts

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