echo

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunEcho

func RunEcho(w io.Writer, args []string, opts EchoOptions) error

RunEcho writes the arguments to the writer.

Types

type EchoOptions

type EchoOptions struct {
	NoNewline      bool // -n: do not output trailing newline
	EnableEscapes  bool // -e: enable interpretation of backslash escapes
	DisableEscapes bool // -E: disable interpretation of backslash escapes (default)
	JSON           bool // --json: output as JSON
}

EchoOptions holds the options for the echo command.

type EchoResult

type EchoResult struct {
	Output string   `json:"output"`
	Args   []string `json:"args"`
}

EchoResult represents echo output for JSON

Jump to

Keyboard shortcuts

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