cmd

package
v0.36.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: ISC Imports: 10 Imported by: 0

Documentation

Overview

Package cmd provides a quick way to create derived interpreters.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cmd

func Cmd(ctx *goal.Context, cfg Config) error

Cmd runs a goal interpreter with starting context ctx and the given help strings when using the repl. Command line usage is then as follows:

program-name [-d] [-i] [-q] [-version] [-e command | script] [args ...]

The ARGS global variable contains the arguments, starting from script name if given.

Types

type Config

type Config struct {
	Help        func(string) string
	ProgramName string
	Man         string
}

Config describes the possible configuration options when running a *goal.Context through Cmd.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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