commandline

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler interface {
	Handle(Response, string)
}

A Handler called with a line read from the command line.

type HandlerFunc

type HandlerFunc func(Response, string)

The HandlerFunc type is an adapter to allow the use of ordinary functions as command line handlers. If f is a function with the appropriate signature, HandlerFunc(f) is a Handler that calls f.

func (HandlerFunc) Handle

func (f HandlerFunc) Handle(r Response, l string)

Handle calls f(w, r).

type Response

type Response struct {
	Signaller
	Stdout io.Writer
}

type Signaller

type Signaller interface {
	Signal(os.Signal) error
}

Jump to

Keyboard shortcuts

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