command

package module
v0.1.25 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2026 License: MIT Imports: 5 Imported by: 3 modules, 1 package

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

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
⌂ 换网址