dup2

package
v0.0.0-...-9b11bb6 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindDuplicateLines

func FindDuplicateLines(FS afero.Fs, reader io.Reader)

FindDuplicateLines prints the count and text of lines that appear more than once in the input, and filenames where they occurs (if input is from named files). Reads from stdin or from a list of named files.

func PopulateLineStats

func PopulateLineStats(filenames []string, FS afero.Fs, reader io.Reader, stats OrderedMap)

func PrintStats

func PrintStats(stats OrderedMap)

Types

type LineStats

type LineStats struct {
	// contains filtered or unexported fields
}

type OrderedMap

type OrderedMap struct {
	Lines *[]string
	M     map[string]*LineStats
}

func (*OrderedMap) Get

func (orderedMap *OrderedMap) Get(line string) (lineStats *LineStats, exist bool)

func (*OrderedMap) Set

func (orderedMap *OrderedMap) Set(line string, lineStats *LineStats)

Jump to

Keyboard shortcuts

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