args

package
v3.0.0-...-c77a060 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Join

func Join(flagName string, n ...int) func(c *app.Context) error

Join is like Optional, but reads up to n arguments joined with spaces and sets the one named flag. if n is not set, reads all the remaining arguments.

func Optional

func Optional(args ...string) func(c *app.Context) error

Optional takes a list of flag names. For each flag name it attempts to read the next arg and set the flag with the corresponding name. for instance: Optional("server", "disc", "size") will attempt to read 3 arguments, setting the "server" flag to the first, "disc" to the 2nd, "size" to the third.

Types

This section is empty.

Jump to

Keyboard shortcuts

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