package
3.3.0+incompatible
Repository: https://github.com/google/agi.git
Documentation: pkg.go.dev

# Packages

Package auth provides simple token based, stream authorization functions.
Package benchmark provides benchmarking facilities to the standard application system.
Package crash provides functions for reporting application crashes (uncaught panics).
Package flag provides extended support for flag parsing.
Package layout is used to find parts of the application package to load or run.
Package linker provides functions for findings addresses of app functions by name.
Package status provides methods for reporting application status.

# Functions

AddCleanup calls f when the context is cancelled.
AddCleanupSignal adds a signal the app should wait on when shutting down.
AddInterruptHandler adds a function that will be called on the next interrupt.
AddVerb adds a new verb to the supported set, it will panic if a duplicate name is encountered.
FilterVerbs returns the filtered list of verbs who's names match the specified prefix.
MakeDocs.
Run wraps doRun in order to let doRun use deferred functions.
Usage prints message with the formatting args to stderr, and then prints the command usage information and terminates the program.
VerbMain is a task that can be handed to Run to invoke the verb handling system.
VersionSpecFromTag parses the version from a git tag name.
WaitForCleanup waits for all the cleanup signals to fire, or the cleanup timeout to expire, whichever comes first.

# Constants

FatalExit is the exit code if something logs at a fatal severity (critical or higher by default).
SuccessExit is the exit code for succesful exit.
UsageExit is the exit code if the usage function was invoked.

# Variables

CleanupTimeout is the time to wait for all cleanup signals to fire when shutting down.
ExitFuncForTesting can be set to change the behaviour when there is a command line parsing failure.
Flags is the main application flags.
LogHandler is the primary application logger target.
Name is the full name of the application.
Restart is the error to return to cause the app to restart itself.
ShortHelp should be set to add a help message to the usage text.
ShortUsage is usage text for the additional non-flag arguments.
UsageFooter is printed at the bottom of the usage text.
Version holds the version specification for the application.

# Structs

Verb holds information about a runnable api command.
VersionSpec is the structure for the version of an application.

# Interfaces

Action is the interface for verb actions that can be run.

# Type aliases

Cleanup is a function that is invoked at a later time to perform the cleanup.
ExitCode is the type for named return values from the application main entry point.