mirror of
https://github.com/taigrr/gico.git
synced 2026-04-02 03:09:07 -07:00
add caching for authors, expauthor type
This commit is contained in:
@@ -12,6 +12,10 @@ import (
|
||||
)
|
||||
|
||||
func (paths RepoSet) GetRepoAuthors() ([]string, error) {
|
||||
cache, ok := GetCachedReposAuthors(paths)
|
||||
if ok {
|
||||
return cache, nil
|
||||
}
|
||||
outChan := make(chan types.Commit, 10)
|
||||
var wg sync.WaitGroup
|
||||
for _, p := range paths {
|
||||
@@ -45,6 +49,7 @@ func (paths RepoSet) GetRepoAuthors() ([]string, error) {
|
||||
a = append(a, k)
|
||||
}
|
||||
sort.Strings(a)
|
||||
CacheReposAuthors(paths, a)
|
||||
return a, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user