Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Command = &cli.Command{ Name: "generate", Aliases: []string{"g"}, Usage: "Generate .gitignore file", Flags: []cli.Flag{ &cli.StringSliceFlag{ Name: "lang", Aliases: []string{"l"}, Required: true, Usage: "Templates to generate file", }, &cli.StringFlag{ Name: "path", Aliases: []string{"p"}, Usage: "Path to .gitignore file", Value: ".", }, &cli.BoolFlag{ Name: "force", Aliases: []string{"f"}, Usage: "Force create a new .gitignore file. This flag will override the existent file", Value: false, }, }, Action: func(c *cli.Context) error { return logging.Log("generating file...", func() error { if err := checkFile(c); err != nil { return err } return generate(c) }) }, }
Command for generate
View Source
var ErrFileExists = errors.New(".gitignore file already exists. Use --force flag to override it")
ErrFileExists return if file already exists
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.