Move: chan closing in "main" func

This commit is contained in:
Yoann La Cancellera
2023-11-24 10:22:29 +01:00
committed by Sveta Smirnova
parent 955fd75ca9
commit 90ae30517a

View File

@@ -55,6 +55,7 @@ func timelineFromPaths(paths []string, regexes types.RegexMap) (types.Timeline,
if err != nil {
logger.Error().Str("path", path).Err(err).Msg("execGrepAndIterate returned error")
}
close(stdout)
}()
// it will iterate on stdout pipe results
@@ -109,8 +110,6 @@ func prepareGrepArgument(regexes types.RegexMap) string {
func execGrepAndIterate(path, compiledRegex string, stdout chan<- string) error {
defer close(stdout)
// A first pass is done, with every regexes we want compiled in a single one.
/*