func collectByWalk(filePaths *[]string, folder string) error { checkExtensionFunc := func(ext string) bool { return ADDITIONAL_FILE_VALID_EXTENSIONS_NO_HEADERS[ext] } walkFunc := utils.CollectAllReadableFiles(filePaths, checkExtensionFunc) err := gohasissues.Walk(folder, walkFunc) return utils.WrapError(err) }
func collectAllSketchFiles(from string) ([]string, error) { filePaths := []string{} checkExtensionFunc := func(ext string) bool { return MAIN_FILE_VALID_EXTENSIONS[ext] || ADDITIONAL_FILE_VALID_EXTENSIONS[ext] } walkFunc := utils.CollectAllReadableFiles(&filePaths, checkExtensionFunc) err := gohasissues.Walk(from, walkFunc) return filePaths, utils.WrapError(err) }
func collectByWalk(filePaths *[]string, folder string) error { checkExtensionFunc := func(filePath string) bool { name := filepath.Base(filePath) ext := strings.ToLower(filepath.Ext(filePath)) return !strings.HasPrefix(name, ".") && ADDITIONAL_FILE_VALID_EXTENSIONS_NO_HEADERS[ext] } walkFunc := utils.CollectAllReadableFiles(filePaths, checkExtensionFunc) err := gohasissues.Walk(folder, walkFunc) return utils.WrapError(err) }
func collectAllSketchFiles(from string) ([]string, error) { filePaths := []string{} checkExtensionFunc := func(filePath string) bool { name := filepath.Base(filePath) ext := strings.ToLower(filepath.Ext(filePath)) return !strings.HasPrefix(name, ".") && MAIN_FILE_VALID_EXTENSIONS[ext] || ADDITIONAL_FILE_VALID_EXTENSIONS[ext] } walkFunc := utils.CollectAllReadableFiles(&filePaths, checkExtensionFunc) err := gohasissues.Walk(from, walkFunc) return filePaths, i18n.WrapError(err) }