cli

package
v3.8.4 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: GPL-3.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseAndExecute

func ParseAndExecute() error

ParseAndExecute runs the command coming from args. This function will wait for the command to finish before return.

func RegisterCallback

func RegisterCallback(exactMatches []string, validator func([]string) error, callback func([]string) error)

RegisterCallback registers a CLI parser callback before the CLI arguments are processed.

exactMatches is a list of strings that must match os.Args for the callback to be selected. An empty string means match everything.

validator does additional validation on os.Args. If an error is returned, the error message is printed back to user.

callback executes the actual action for the given CLI arguments.

func RegisterClientCommands

func RegisterClientCommands()

RegisterClientCommands registers all the client side CLI commands.

func RegisterServerCommands

func RegisterServerCommands()

RegisterServerCommands registers all the server side CLI commands.

Types

This section is empty.

Jump to

Keyboard shortcuts

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