How to get absolute file paths in the range of directories?

Implemented the parser logs on the GO at the moment, the program takes the path parameter in this format example /var/log/2019/2019-05/2019-05-27/ , parse only the current folder and returns the full path to the file, I would like to know,and how to implement the parser for the file paths in this shape --datastart /var/log/2019/2019-05/2019-05-01/ --dataend /var/log/2019/2019-05/2019-05-31/ in order to parse a specific date range, which are divided into folders.
My function is the first option :
func WalkFile(done <- chan struct{},root string)(<-chan string,<-chan error){

 paths := make(chan string)
 errc := make(chan error,1)

 go func() {

 defer close(paths)
 errc <- filepath.Walk(root, func(path string, info os.FileInfo, err error) error {
 if err != nil{
 return err
}
 if !info.Mode().IsRegular(){
 return nil

}

 select {
 case paths <- path:
 case <-done:
 return nil


}
 return nil
})

}()

 return paths,errc
}
March 23rd 20 at 18:48
2 answers
March 23rd 20 at 18:50
For you no way to parse and filter will not. This is your logic.
But recursively around prevents https://github.com/golang/go/issues/11862.
There recommend https://github.com/bmatcuk/doublestar - use myself. Either manual recursion.
March 23rd 20 at 18:52
Alternatively, you cede not flag as arguments to pass a list, something like
/opt/application /var/log/2019/2019-05/2019-05-*
Linux alone will find everything that satisfies and will give to your application

Find more questions by tags AlgorithmsGoLinux