1
0
Fork 0
mirror of https://github.com/vbatts/go-mtree.git synced 2025-06-28 12:58:28 +00:00

WIP
Some checks failed
continuous-integration/drone/push Build is failing

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2024-12-14 08:34:19 -05:00
parent 7c33cb7d95
commit fcacdf01e7
Signed by: vbatts
GPG key ID: E30EFAA812C6E5ED
3 changed files with 23 additions and 2 deletions

View file

@ -0,0 +1,21 @@
package cmd
import (
cli "github.com/urfave/cli/v2"
)
func NewMtree2JsonCommand() *cli.Command {
return &cli.Command{
Name: "mtree2json,",
Usage: "represent an mtree as JSON format",
Aliases: []string{"m2j"},
Action: validateAction,
Flags: []cli.Flag{
&cli.StringSliceFlag{
Name: "file",
Aliases: []string{"f"},
Usage: "Directory hierarchy spec to validate",
},
},
}
}

View file

@ -42,6 +42,7 @@ to support xattrs and interacting with tar archives.`
}
app.Commands = []*cli.Command{
cmd.NewValidateCommand(),
cmd.NewMtree2JsonCommand(),
}
// Unfortunately urfave/cli is not at good at using DefaultCommand