latest
This commit is contained in:
parent
5f5f51c014
commit
99e89d60d4
12
internal/cli/fetch.go
Normal file
12
internal/cli/fetch.go
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
package cli
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
|
||||||
|
"github.com/urfave/cli/v2"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (mfa *CLIApp) fetchManifestOperation(c *cli.Context) error {
|
||||||
|
fmt.Println("fetchManifestOperation()")
|
||||||
|
return nil
|
||||||
|
}
|
@ -10,7 +10,15 @@ import (
|
|||||||
|
|
||||||
func (mfa *CLIApp) generateManifestOperation(c *cli.Context) error {
|
func (mfa *CLIApp) generateManifestOperation(c *cli.Context) error {
|
||||||
fmt.Println("generateManifestOperation()")
|
fmt.Println("generateManifestOperation()")
|
||||||
fmt.Printf("called with arg: %s\n", c.String("input"))
|
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{
|
opts := &mfer.ManifestScanOptions{
|
||||||
IgnoreDotfiles: c.Bool("IgnoreDotfiles"),
|
IgnoreDotfiles: c.Bool("IgnoreDotfiles"),
|
||||||
|
@ -87,6 +87,7 @@ func (mfa *CLIApp) run() {
|
|||||||
Aliases: []string{"ignore-dotfiles"},
|
Aliases: []string{"ignore-dotfiles"},
|
||||||
Usage: "Ignore any dot (hidden) files encountered",
|
Usage: "Ignore any dot (hidden) files encountered",
|
||||||
},
|
},
|
||||||
|
// FIXME this should be a positional arg
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "input",
|
Name: "input",
|
||||||
Value: ".",
|
Value: ".",
|
||||||
@ -119,6 +120,16 @@ func (mfa *CLIApp) run() {
|
|||||||
return nil
|
return nil
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
Name: "fetch",
|
||||||
|
Usage: "fetch manifest and referenced files",
|
||||||
|
Action: func(c *cli.Context) error {
|
||||||
|
if !c.Bool("quiet") {
|
||||||
|
mfa.printBanner()
|
||||||
|
}
|
||||||
|
return mfa.fetchManifestOperation(c)
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user