command

package module
v0.1.28 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2026 License: MIT Imports: 8 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

Index

Constants

View Source
const (
	GrepIgnoreCase   grepIgnoreCaseFlag = true
	GrepNoIgnoreCase grepIgnoreCaseFlag = false
)
View Source
const (
	GrepInvert   grepInvertFlag = true
	GrepNoInvert grepInvertFlag = false
)
View Source
const (
	GrepWholeLine   grepWholeLineFlag = true
	GrepNoWholeLine grepWholeLineFlag = false
)
View Source
const (
	GrepExtended   grepExtendedFlag = true
	GrepNoExtended grepExtendedFlag = false
)
View Source
const (
	GrepWord   grepWordFlag = true
	GrepNoWord grepWordFlag = false
)
View Source
const (
	GrepLineNumbers   grepLineNumbersFlag = true
	GrepNoLineNumbers grepLineNumbersFlag = false
)
View Source
const (
	GrepCount   grepCountFlag = true
	GrepNoCount grepCountFlag = false
)
View Source
const ErrInvalidPattern errs.Const = "invalid pattern"

ErrInvalidPattern wraps a regular expression that fails to compile (-E/-w).

Variables

This section is empty.

Functions

func Grep

func Grep(pattern GrepPattern, opts ...any) gloo.Command[[]byte, []byte]

Grep returns a Command that filters lines matching pattern. pattern is a required positional argument; the remaining options select the match mode.

Flags:

  • GrepIgnoreCase (-i): case-insensitive matching
  • GrepInvert (-v): emit non-matching lines
  • GrepWholeLine (-x): match only when the whole line equals the pattern
  • GrepExtended (-E): interpret the pattern as an extended regular expression
  • GrepWord (-w): match only at word boundaries
  • GrepLineNumbers (-n): prefix each emitted line with its line number
  • GrepCount (-c): emit the count of matching lines instead of the lines

Types

type GrepPattern

type GrepPattern string

GrepPattern is the pattern grep matches each line against: a literal substring by default, or a regular expression under -E/-w.

Directories

Path Synopsis
Package alias provides short names for grep command flags.
Package alias provides short names for grep command flags.

Jump to

Keyboard shortcuts

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