func IsStaticFile(target string) bool {
	return compileRegexp(`^.*\.`, target)
}
IsStaticFile checks whether target is static file which has extension in file name or not
package files
import (
	"io/ioutil"
	"path/filepath"
	"regexp"
	"sync"
	"github.com/pkg/errors"
)
func GetFileList(basePath string, exts []string) ([]string, error) {
	if _, err := ioutil.ReadDir(basePath); err != nil {
		return nil, err
	}
	if len(exts) == 0 {
		return nil, errors.New("no extensions in parameter")
	}
	files := []string{}
	pool := 20
	ch := make(chan string, pool)
	chSmp := make(chan bool, pool)
	wg := &sync.WaitGroup{}
	go checkDir(basePath, exts, ch, chSmp, wg, true)
	for {
		v, ok := <-ch
		if !ok {
			break
		}
		files = append(files, v)
	}
	return files, nil
}
func checkDir(basePath string, exts []string, ch chan<- string, chSmp chan bool, wg *sync.WaitGroup, isClose bool) {
	filelist, err := ioutil.ReadDir(basePath)
	if err != nil {
		return
	}
	for _, file := range filelist {
		if IsInvisiblefile(file.Name()) {
			continue
		}
		fullPath := filepath.Join(basePath, file.Name())
		if file.IsDir() {
			wg.Add(1)
			chSmp <- true
			go func() {
				defer func() {
					<-chSmp
					wg.Done()
				}()
				checkDir(fullPath, exts, ch, chSmp, wg, false)
			}()
		} else {
			for _, ext := range exts {
				if IsExtFile(file.Name(), ext) {
					ch <- fullPath
				}
			}
		}
	}
	if isClose {
		wg.Wait()
		close(ch)
	}
}