Created
January 21, 2018 19:38
-
-
Save picatz/b7c4750d1b82739ff96c48ef2d435954 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func FindInPath(targets []string) <-chan string { | |
messages := make(chan string) | |
go func() { | |
defer close(messages) | |
var paths = EnviromentPaths() | |
for _, target := range targets { | |
for _, path := range paths { | |
var target = path + "/" + target | |
if Exists(target) { | |
messages <- target | |
} | |
} | |
} | |
}() | |
return messages | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment