cmd

package
v2.22.1 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package cmd implements the go-httpbin command line interface as a testable package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Main

func Main(build BuildInfo) int

Main is the main entrypoint for the go-httpbin binary. See loadConfig() for command line argument parsing.

Types

type BuildInfo added in v2.22.0

type BuildInfo struct {
	Version string
	Commit  string
	Date    string
}

BuildInfo holds build metadata.

type ConfigError

type ConfigError struct {
	Err   error
	Usage string
}

ConfigError is used to signal an error with a command line argument or environment variable.

It carries the command's usage output, so that we can decouple configuration parsing from error reporting for better testability.

func (ConfigError) Error

func (e ConfigError) Error() string

Error implements the error interface.

Jump to

Keyboard shortcuts

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