29 lines
615 B
Go
29 lines
615 B
Go
package cli
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"git.eeqj.de/sneak/mfer/mfer"
|
|
"github.com/davecgh/go-spew/spew"
|
|
"github.com/urfave/cli/v2"
|
|
)
|
|
|
|
func (mfa *CLIApp) generateManifestOperation(c *cli.Context) error {
|
|
fmt.Println("generateManifestOperation()")
|
|
fmt.Printf("called with arg: %s\n", c.String("input"))
|
|
|
|
opts := &mfer.ManifestScanOptions{
|
|
IgnoreDotfiles: c.Bool("IgnoreDotfiles"),
|
|
FollowSymLinks: c.Bool("FollowSymLinks"),
|
|
}
|
|
// FIXME add command flags for ignoring dotfiles and following symlinks
|
|
mf, err := mfer.NewFromPath(c.String("input"), opts)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
|
|
spew.Dump(mf)
|
|
|
|
return nil
|
|
}
|