uniq

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(args []string) error

Types

type Config

type Config struct {
	Count      bool `flag:"" desc:"Prefix lines by number of occurrences"`
	Duplicates bool `flag:"" desc:"Only show duplicate lines"`
	Unique     bool `flag:"" desc:"Only show unique lines"`
	IgnoreCase bool `flag:"" desc:"Case insensitive comparison"`
	XML        bool
	JSON       bool
	Plain      bool
	Pretty     bool
}

type UniqDup

type UniqDup struct {
	XMLName xml.Name `xml:"duplicate"`
	Line    string   `xml:"line,attr"`
	Count   int      `xml:"count,attr"`
}

type UniqError

type UniqError struct {
	XMLName xml.Name `xml:"error"`
	Code    int      `xml:"code,attr"`
	Msg     string   `xml:"msg,attr"`
}

type UniqResult

type UniqResult struct {
	XMLName           xml.Name    `xml:"uniq"`
	Timestamp         int64       `xml:"timestamp,attr"`
	LinesIn           int         `xml:"lines_in,attr"`
	LinesOut          int         `xml:"lines_out,attr"`
	DuplicatesRemoved int         `xml:"duplicates_removed,attr"`
	Content           string      `xml:"content,omitempty"`
	Duplicates        []UniqDup   `xml:"duplicate,omitempty"`
	Errors            []UniqError `xml:"error,omitempty"`
}

Jump to

Keyboard shortcuts

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