refactor: simplify walkDir signature (#2043) There's 2 commits here both simplifying it in different ways. **What type of PR is this?** Other **What package or component does this PR mostly affect?** all **What does this PR do? Why is it needed?** Cleanup regarding https://github.com/bazel-contrib/bazel-gazelle/pull/2039#discussion_r1964845284