cli

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package cli wires httpfly's command-line arguments to its subcommands.

Index

Constants

This section is empty.

Variables

View Source
var ErrSilent = errors.New("")

ErrSilent marks a returned error whose message must not be printed -- used when the caller (currently just "run -json") has already written its complete, parseable output to stdout and a human-readable summary alongside it would risk corrupting that output for a tool reading it (e.g. one that merges stdout and stderr). The exit code still reflects failure; wrap it with fmt.Errorf's %w or return it directly.

View Source
var Version = "dev"

Version is httpfly's version. It defaults to "dev" for local builds (go run, go build without flags) and is overridden at release-build time via:

go build -ldflags "-X github.com/cristianradulescu/httpfly/internal/cli.Version=X.Y.Z"

(see the Makefile's build target).

Functions

func Run

func Run(args []string, stdout, stderr io.Writer) error

Run dispatches args to a subcommand, writing normal and error output to stdout/stderr respectively.

Types

This section is empty.

Jump to

Keyboard shortcuts

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