rollup from next branch (#4)
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Co-authored-by: sneak <sneak@sneak.berlin> Reviewed-on: #4
This commit was merged in pull request #4.
This commit is contained in:
36
internal/cli/gen.go
Normal file
36
internal/cli/gen.go
Normal file
@@ -0,0 +1,36 @@
|
||||
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()")
|
||||
myArgs := c.Args()
|
||||
spew.Dump(myArgs)
|
||||
|
||||
fmt.Printf("%#v\n", c.Args().First())
|
||||
if c.Args().Len() > 0 {
|
||||
fmt.Printf("%#v\n", c.Args().Get(1))
|
||||
}
|
||||
|
||||
// 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
|
||||
}
|
||||
Reference in New Issue
Block a user