Skip to content

Commit

Permalink
Remove listFolders function
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan-Ethernal committed Mar 11, 2024
1 parent 23cac69 commit f91d80b
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions tests/state_test_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"fmt"
"io/fs"
"math/big"
"os"
"path/filepath"
"strings"
"testing"
Expand Down Expand Up @@ -615,37 +614,6 @@ func contains(l []string, name string) bool {
return false
}

func listFolders(paths []string) ([]string, error) {
var folders []string

for _, rootPath := range paths {
err := filepath.WalkDir(rootPath, func(path string, d fs.DirEntry, err error) error {
if err != nil {
return err
}

if d.IsDir() {
files, err := os.ReadDir(path)
if err != nil {
return err
}

if len(files) > 0 {
folders = append(folders, path)
}
}

return nil
})

if err != nil {
return nil, err
}
}

return folders, nil
}

func listFiles(folder string, extensions ...string) ([]string, error) {
var files []string

Expand Down

0 comments on commit f91d80b

Please sign in to comment.