From 3b3b2cd7b9be250db67ca481d70a6f8060f4fcb0 Mon Sep 17 00:00:00 2001 From: Hayden <64056131+hay-kot@users.noreply.github.com> Date: Mon, 15 Aug 2022 07:34:22 -0800 Subject: [PATCH] rename filename to dirPath --- internal/build/build.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/build/build.go b/internal/build/build.go index f75c884..f6d0f98 100644 --- a/internal/build/build.go +++ b/internal/build/build.go @@ -222,9 +222,9 @@ func GfmrunActionFunc(cCtx *cli.Context) error { return err } - filename := cCtx.Args().Get(0) - if filename == "" { - filename = "README.md" + dirPath := cCtx.Args().Get(0) + if dirPath == "" { + dirPath = "README.md" } walk := cCtx.Bool("walk") @@ -232,7 +232,7 @@ func GfmrunActionFunc(cCtx *cli.Context) error { if walk { // 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 { return err } @@ -252,7 +252,7 @@ func GfmrunActionFunc(cCtx *cli.Context) error { return err } } else { - sources = append(sources, filename) + sources = append(sources, dirPath) } var counter int