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: 5 Imported by: 0

README

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Tail

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

Tail returns a Command that emits a trailing slice of its input.

Modes (first match wins):

  • TailBytes(n) (-c n): emit the last n bytes of the reconstituted input.
  • TailFromLine(n) (-n +n): emit every line from the 1-indexed line n onward.
  • TailLines(n) (-n n): emit the last n lines. n <= 0 falls back to ten.

With no flag, Tail emits the last ten lines.

Types

type TailBytes

type TailBytes int

TailBytes outputs the last N bytes instead of lines (-c N). When set, the command reconstitutes the input stream and emits the last N bytes.

type TailFromLine

type TailFromLine int

TailFromLine outputs every line from line N onward, 1-indexed (-n +N). TailFromLine(1) emits the whole input; TailFromLine(3) drops the first two lines. A value of zero or below leaves the from-line mode disabled.

type TailLines

type TailLines int

TailLines sets the number of trailing lines to output (-n N). Default: 10.

Directories

Path Synopsis
Package alias provides unprefixed type aliases for tail command flags.
Package alias provides unprefixed type aliases for tail command flags.

Jump to

Keyboard shortcuts

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