command

package module
v0.1.24 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2026 License: MIT Imports: 4 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

Examples

Constants

View Source
const (
	HexdumpCanonical   hexdumpCanonicalFlag = true
	HexdumpNoCanonical hexdumpCanonicalFlag = false
)

Variables

This section is empty.

Functions

func Hexdump

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

Hexdump returns a command that produces a hex dump of each input line.

Default: space-separated hex bytes for each line. With HexdumpCanonical (-C): offset, hex bytes with midpoint gap, and ASCII sidebar.

Example
package main

import (
	"fmt"
	"strings"

	"github.com/gloo-foo/testable"

	command "github.com/gloo-foo/cmd-hexdump"
)

func main() {
	lines, _ := testable.TestLines(command.Hexdump(), "Hello\n")
	fmt.Println(strings.Join(lines, "\n"))
}
Output:
48 65 6c 6c 6f
Example (Canonical)
package main

import (
	"fmt"
	"strings"

	"github.com/gloo-foo/testable"

	command "github.com/gloo-foo/cmd-hexdump"
)

func main() {
	lines, _ := testable.TestLines(command.Hexdump(command.HexdumpCanonical), "Hi\n")
	fmt.Println(strings.Join(lines, "\n"))
}
Output:
00000000  48 69                                             |Hi|

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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