...

Source file src/github.com/urfave/cli/v2/cli.go

Documentation: github.com/urfave/cli/v2

     1  // Package cli provides a minimal framework for creating and organizing command line
     2  // Go applications. cli is designed to be easy to understand and write, the most simple
     3  // cli application can be written as follows:
     4  //
     5  //	func main() {
     6  //		(&cli.App{}).Run(os.Args)
     7  //	}
     8  //
     9  // Of course this application does not do much, so let's make this an actual application:
    10  //
    11  //	func main() {
    12  //		app := &cli.App{
    13  //	  		Name: "greet",
    14  //	  		Usage: "say a greeting",
    15  //	  		Action: func(c *cli.Context) error {
    16  //	  			fmt.Println("Greetings")
    17  //	  			return nil
    18  //	  		},
    19  //		}
    20  //
    21  //		app.Run(os.Args)
    22  //	}
    23  package cli
    24  
    25  //go:generate make -C cmd/urfave-cli-genflags run
    26  

View as plain text