Documentation
¶
Overview ¶
Package rgo handles the rgo command line. It contains a handler for each of the modes, along with all the flag handling and the command line output format.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct { // Embed the basic profiling flags supported by the tool package tool.Profile // Enable verbose logging Verbose bool `flag:"v" help:"verbose output"` // contains filtered or unexported fields }
Application is the main application as passed to tool.Main It handles the main command line parsing and dispatch to the sub commands.
func New ¶
func New(name, wd string, env []string) *Application
Returns a new Application ready to run.
func (*Application) DetailedHelp ¶
func (app *Application) DetailedHelp(f *flag.FlagSet)
DetailedHelp implements tool.Application returning the main binary help. This includes the short help for all the sub commands.
func (*Application) Name ¶
func (app *Application) Name() string
Name implements tool.Application returning the binary name.
func (*Application) Run ¶
func (app *Application) Run(ctx context.Context, args ...string) error
Run takes the args after top level flag processing, and invokes the correct sub command as specified by the first argument. If no arguments are passed it will invoke the server sub command, as a temporary measure for compatibility.
func (*Application) ShortHelp ¶
func (app *Application) ShortHelp() string
ShortHelp implements tool.Application returning the main binary help.
func (*Application) Usage ¶
func (app *Application) Usage() string
Usage implements tool.Application returning empty extra argument usage.
type Config ¶
type Config struct { // PkgPath is the package import path for the package // to be wrapped by rgo. It depends on the go.mod file // at the root of the destination rgo package. PkgPath string // AllowedFuncs is a pattern matching names of // functions that may be wrapped. If AllowedFuncs // is empty all wrappable functions are wrapped. AllowedFuncs string // Exported is a pattern matching the Go names of // functions that will be exported. If Exported is // empty all wrapped functions are exported. Exported string // Words is a set of known words that can be provided // to ensure camel-case to snake case breaks words // correctly. If words is nil, "NaN" and "NA" are // used. Set words to []string{} to provide an empty // set of words. Words []string // LicenseDir is the directory to put license files // when more than one license exists. LicenseDir string // LicensePattern is the pattern for license file // names to check. The pattern is used with the // case-insensitive flag. LicensePattern string }
Config is an rgo build config.