mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-10-16 07:18:07 +00:00
Move: chan closing in "main" func
This commit is contained in:
@@ -55,6 +55,7 @@ func timelineFromPaths(paths []string, regexes types.RegexMap) (types.Timeline,
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Error().Str("path", path).Err(err).Msg("execGrepAndIterate returned error")
|
logger.Error().Str("path", path).Err(err).Msg("execGrepAndIterate returned error")
|
||||||
}
|
}
|
||||||
|
close(stdout)
|
||||||
}()
|
}()
|
||||||
|
|
||||||
// it will iterate on stdout pipe results
|
// 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 {
|
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.
|
// A first pass is done, with every regexes we want compiled in a single one.
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user