mirror of
https://github.com/avelino/awesome-go.git
synced 2024-11-07 16:33:40 +00:00
simplify some expressions
This commit is contained in:
parent
360d054d03
commit
c910a811d7
@ -149,11 +149,6 @@ func getAllFlaggedRepositories(t *testing.T, client *http.Client) map[string]boo
|
|||||||
return addressedRepositories
|
return addressedRepositories
|
||||||
}
|
}
|
||||||
|
|
||||||
func containsOpenIssue(link string, openIssues map[string]bool) bool {
|
|
||||||
_, ok := openIssues[link]
|
|
||||||
return ok
|
|
||||||
}
|
|
||||||
|
|
||||||
func checkRepoAvailability(toRun bool, href string, client *http.Client) ([]string, bool) {
|
func checkRepoAvailability(toRun bool, href string, client *http.Client) ([]string, bool) {
|
||||||
if !toRun {
|
if !toRun {
|
||||||
return nil, false
|
return nil, false
|
||||||
@ -294,14 +289,12 @@ func TestStaleRepository(t *testing.T) {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
issueExists := containsOpenIssue(href, addressedRepositories)
|
if _, issueExists := addressedRepositories[href]; issueExists {
|
||||||
if issueExists {
|
|
||||||
log.Printf("issue already exists for %s\n", href)
|
log.Printf("issue already exists for %s\n", href)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
isGithubRepo := reGithubRepo.MatchString(href)
|
if !reGithubRepo.MatchString(href) {
|
||||||
if !isGithubRepo {
|
|
||||||
log.Printf("%s non-github repo not currently handled", href)
|
log.Printf("%s non-github repo not currently handled", href)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user