func ListFiles(dir string) ([]string, error) {
	list := make([]string, 0)
	if !Exists(dir) {
		return list, fmt.Errorf("Doc dir not found %s", dir)
	}
	err := filepath.Walk(dir, func(path string, info os.FileInfo, err error) error {
		if info.IsDir() {
			return nil
		}
		if strings.HasSuffix(path, "mgmt-api.txt") {
			return nil
		}
		if !strings.HasSuffix(path, "-api.txt") {
			return nil
		}
		list = append(list, path)
		return nil
	})
	if err != nil {
		log.Errorf("Failed to list files: %s", err)
		return list, nil
	}
	return list, nil
}
ListFiles return a list of bluez api txt
package util
import (
	"fmt"
	"io/ioutil"
	"os"
	"os/exec"
	"path/filepath"
	"strings"
	log "github.com/sirupsen/logrus"
)
func Mkdir(dirpath string) error {
	err := os.Mkdir(dirpath, 0755)
	if err != nil && !os.IsExist(err) {
		return err
	}
	return nil
}