command

package module
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: MIT Imports: 5 Imported by: 0

README

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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

Head returns a Command that outputs the leading prefix of its input.

Flags:

  • HeadLines (-n): emit the first N lines (default: 10).
  • HeadBytes (-c): emit the first N bytes; collects the input, joins lines with newlines, truncates to N bytes, and emits the result as a line-oriented stream (one value per line, the newlines stripped).

HeadBytes takes precedence over HeadLines when set to a positive count.

Types

type HeadBytes

type HeadBytes int

HeadBytes sets the number of bytes to output (-c flag). When set, the command collects all input and emits the first N bytes.

type HeadLines

type HeadLines int

HeadLines sets the number of lines to output. Default: 10.

Directories

Path Synopsis
Package alias provides unprefixed names for the head command flags.
Package alias provides unprefixed names for the head command flags.

Jump to

Keyboard shortcuts

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