mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-06 04:17:55 +00:00
Move: chan closing in "main" func
This commit is contained in:

committed by
Sveta Smirnova

parent
955fd75ca9
commit
90ae30517a
@@ -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.
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user