Help us shape the future of Go! Take the 2026 Go Developer Survey

echo

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package echo implements the `echo` built-in.

Flags:

  • -n do not append a trailing newline
  • -e enable backslash escape interpretation
  • -E disable backslash escape interpretation (default)

Notes:

  • mvdan/sh handles `echo` as its own internal builtin BEFORE our ExecHandler middleware fires, so a script's bare `echo foo` never reaches this code path. This built-in serves the `/bin/echo`, `command echo`, and `enable -n echo` invocation forms — and provides parity for direct dispatch in tests.
  • The xpg_echo shopt is not yet wired (Phase 11 will add the shopt builtin); when it lands, this implementation will check it via c.Env or a future c.Shopt accessor.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() command.Command

New returns the echo command.

Types

This section is empty.

Jump to

Keyboard shortcuts

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