tap

package module
v0.5.1-a Latest Latest
Warning

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

Go to latest
Published: May 19, 2026 License: MIT Imports: 6 Imported by: 0

README

tap

Terminal Argument Parsing.

Documentation

Index

Constants

View Source
const Version = "0.5.1"

Variables

This section is empty.

Functions

This section is empty.

Types

type HandlerFuncType

type HandlerFuncType func(*Parser, []string) error

Type of handler for command.

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

Tap - Terminal Argument Parsing

This parser - main object in tap.

Main methods:

- AddCommand(name string, handler HandlerFuncType)

- Main() - start parser

func NewParser

func NewParser(cli_name string, about string, help_commands []string) Parser

Create Parser object.

func (*Parser) AddCommand

func (p *Parser) AddCommand(
	name string,
	handler HandlerFuncType,
	docs string,
	required_args []string,
	optional_args []string,
	unlimited_max_args bool,
)

Add command to parser.

func (*Parser) Main

func (p *Parser) Main() error

Main function of Parser.

func (*Parser) Print

func (p *Parser) Print(flag string, format string, args ...any)

Print info if flag parser flag is true

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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