// scanFiles walks the files listed in the arguments. These files may
// be either certificate files or directories containing certificates.
scanFiles walks the files listed in the arguments. These files may
be either certificate files or directories containing certificates.
// scanFiles walks the files listed in the arguments . These files may // be either certificate files or directories containing certificates .
func scanFiles(paths chan string) {
	walker := func(path string, info os.FileInfo, err error) error {
		log.Infof("Found %s", path)
		if err != nil {
			return err
		}
		if info.Mode().IsRegular() {
			paths <- path
		}
		return nil
	}
	for _, path := range flag.Args() {
		err := filepath.Walk(path, walker)
		if err != nil {
			log.Errorf("Walk failed: %v", err)
		}
	}
	close(paths)
}
func scanFiles ( paths chan string ) { walker := func ( path string , info os . FileInfo , err error ) error { log . Infof ( " " , path ) if err != nil { return err } if info . Mode ( ) . IsRegular ( ) { paths <- path } return nil } for _ , path := range flag . Args ( ) { err := filepath . Walk ( path , walker ) if err != nil { log . Errorf ( " " , err ) } } close ( paths ) }
scanFiles walks the files listed in the arguments.
scanFiles walks the files listed in the arguments .