command

package module
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2026 License: MIT Imports: 4 Imported by: 0

README

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Shuf

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

Shuf returns a command that randomly shuffles input lines.

  • ShufCount(n) (-n): cap the output at n lines.
  • ShufSeed(s) (--seed): deterministic output from a fixed seed.
  • ShufRange(lo, hi) (-i): shuffle the integers lo..hi instead of stdin.
  • ShufEcho(args...) (-e): shuffle the given arguments instead of stdin.

Types

type ShufBound

type ShufBound int

ShufBound is an inclusive endpoint of the -i integer range.

type ShufCount

type ShufCount int

ShufCount sets the maximum number of output lines (-n flag).

type ShufEchoArgs

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

ShufEchoArgs is the -e option value: the argument lines to shuffle instead of stdin. Build it with ShufEcho.

func ShufEcho

func ShufEcho(args ...ShufLine) ShufEchoArgs

ShufEcho treats the given arguments as input lines to shuffle (-e flag).

type ShufLine

type ShufLine string

ShufLine is one input line supplied as a command argument (-e flag).

type ShufRangeSpec

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

ShufRangeSpec is the -i option value: shuffle the integers of an inclusive range instead of stdin. Build it with ShufRange.

func ShufRange

func ShufRange(lo, hi ShufBound) ShufRangeSpec

ShufRange generates integers from lo to hi (inclusive), shuffled (-i flag).

type ShufSeed

type ShufSeed int64

ShufSeed sets the random seed for deterministic output (--seed flag).

Directories

Path Synopsis
Package alias provides unprefixed names for shuf command flags.
Package alias provides unprefixed names for shuf command flags.

Jump to

Keyboard shortcuts

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