diff options
| author | Jeff Carr <[email protected]> | 2025-01-07 18:24:27 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-01-07 18:24:27 -0600 |
| commit | 8c54c4a7d8fdccd4cf316fac6ff4edcd980a4cf1 (patch) | |
| tree | 971b3cef25b236b4f2ed855f1897ffafd7c506b4 | |
| parent | 366f4680ac1db049599e9ed6e319aea7ae146bc8 (diff) | |
rm old code
| -rw-r--r-- | reloadBranches.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/reloadBranches.go b/reloadBranches.go index 7c07582..be58dfd 100644 --- a/reloadBranches.go +++ b/reloadBranches.go @@ -23,7 +23,7 @@ import ( func (repo *Repo) CheckBranches() bool { var hashCheck string var perfect bool = true - all := repo.getBranches() + all := repo.GetBranches() path := filepath.Join(repo.FullPath, ".git/refs/") for _, b := range all { parts := strings.Split(b, "/") @@ -72,12 +72,12 @@ func (repo *Repo) CheckBranches() bool { return perfect } -func (repo *Repo) getBranches() []string { +func (repo *Repo) GetBranches() []string { var all []string var heads []string var remotes []string - heads = listFiles(filepath.Join(repo.GetFullPath(), "/.git/refs/heads")) - remotes = listFiles(filepath.Join(repo.GetFullPath(), "/.git/refs/remotes")) + heads = ListFiles(filepath.Join(repo.GetFullPath(), "/.git/refs/heads")) + remotes = ListFiles(filepath.Join(repo.GetFullPath(), "/.git/refs/remotes")) all = heads @@ -91,7 +91,7 @@ func (repo *Repo) getBranches() []string { // goes in one directory so it gets remote branch names // old code. todo: modernize it -func listFiles(directory string) []string { +func ListFiles(directory string) []string { var files []string fileInfo, err := os.ReadDir(directory) if err != nil { |
