From b12bc0a9eca8c99f1840872aa838e5aa88edf3ec Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Fri, 1 Mar 2024 21:45:06 -0600 Subject: export isGitDir() --- gitConfig.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gitConfig.go') diff --git a/gitConfig.go b/gitConfig.go index 03bac49..ce8834c 100644 --- a/gitConfig.go +++ b/gitConfig.go @@ -49,7 +49,7 @@ func ListGitDirectories() []string { } // Check if the current path is a directory and has a .git subdirectory - if info.IsDir() && isGitDir(path) { + if info.IsDir() && IsGitDir(path) { all = append(all, path) // fmt.Println(path) } @@ -64,8 +64,8 @@ func ListGitDirectories() []string { return all } -// isGitDir checks if a .git directory exists inside the given directory -func isGitDir(dir string) bool { +// IsGitDir checks if a .git directory exists inside the given directory +func IsGitDir(dir string) bool { gitDir := filepath.Join(dir, ".git") info, err := os.Stat(gitDir) if os.IsNotExist(err) { -- cgit v1.2.3