command

package module
v0.1.24 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2026 License: MIT Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Documentation

Overview

Package command implements the uniq filter: it collapses each run of adjacent identical lines into a single line, matching GNU uniq semantics.

Only ADJACENT duplicates are collapsed — non-adjacent repeats are preserved, exactly as the Unix tool behaves (uniq is typically preceded by sort).

Index

Constants

View Source
const (
	UniqDuplicatesOnly   uniqDuplicatesOnlyFlag = true
	UniqNoDuplicatesOnly uniqDuplicatesOnlyFlag = false
)
View Source
const (
	UniqUniqueOnly   uniqUniqueOnlyFlag = true
	UniqNoUniqueOnly uniqUniqueOnlyFlag = false
)
View Source
const (
	UniqCount   uniqCountFlag = true
	UniqNoCount uniqCountFlag = false
)
View Source
const (
	UniqIgnoreCase   uniqIgnoreCaseFlag = true
	UniqNoIgnoreCase uniqIgnoreCaseFlag = false
)

Variables

This section is empty.

Functions

func Uniq

func Uniq(opts ...any) gloo.Command[[]byte, []byte]

Uniq returns a Command that collapses runs of adjacent duplicate lines.

Flags:

  • UniqDuplicatesOnly (-d): emit only groups that repeat (count > 1)
  • UniqUniqueOnly (-u): emit only groups that do not repeat (count == 1)
  • UniqCount (-c): prefix each emitted line with its occurrence count
  • UniqIgnoreCase (-i): compare lines case-insensitively

-d and -u are complementary selectors; supplying both selects nothing, which is GNU uniq's behavior.

Types

This section is empty.

Directories

Path Synopsis
Package alias provides unprefixed names for the uniq command and its flags.
Package alias provides unprefixed names for the uniq command and its flags.

Jump to

Keyboard shortcuts

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