Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cmd = &cli.Command{ Name: "patch", Usage: "Patching of concrete directory", ArgsUsage: "[patch] [dir]", Flags: []cli.Flag{ &cli.StringSliceFlag{ Name: "param", Aliases: []string{"p"}, }, }, Action: func(ctx *cli.Context) error { opts := Options{} var err error opts.Patch = ctx.Args().Get(0) if opts.Patch == "" { return termui.CliError(ctx, fmt.Errorf("patch is mandatory")) } opts.Dir = ctx.Args().Get(1) if opts.Dir == "" { opts.Dir, err = os.Getwd() if err != nil { return termui.CliError(ctx, fmt.Errorf("cannot use current working dir")) } } opts.Params = excav.StringSliceToParams(ctx.StringSlice("param")) err = applyPatch(&opts) if err != nil { return termui.CliError(ctx, err) } return nil }, }
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.