rename filename to dirPath
This commit is contained in:
parent
c6616c3e47
commit
3b3b2cd7b9
@ -222,9 +222,9 @@ func GfmrunActionFunc(cCtx *cli.Context) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
filename := cCtx.Args().Get(0)
|
dirPath := cCtx.Args().Get(0)
|
||||||
if filename == "" {
|
if dirPath == "" {
|
||||||
filename = "README.md"
|
dirPath = "README.md"
|
||||||
}
|
}
|
||||||
|
|
||||||
walk := cCtx.Bool("walk")
|
walk := cCtx.Bool("walk")
|
||||||
@ -232,7 +232,7 @@ func GfmrunActionFunc(cCtx *cli.Context) error {
|
|||||||
|
|
||||||
if walk {
|
if walk {
|
||||||
// Walk the directory and find all markdown files.
|
// Walk the directory and find all markdown files.
|
||||||
err := filepath.Walk(filename, func(path string, info os.FileInfo, err error) error {
|
err := filepath.Walk(dirPath, func(path string, info os.FileInfo, err error) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -252,7 +252,7 @@ func GfmrunActionFunc(cCtx *cli.Context) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
sources = append(sources, filename)
|
sources = append(sources, dirPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
var counter int
|
var counter int
|
||||||
|
Loading…
Reference in New Issue
Block a user