Compare commits

..

No commits in common. "master" and "v0.7.3" have entirely different histories.

2 changed files with 1 additions and 13 deletions

12
tree.go
View file

@ -3,7 +3,6 @@ package zord_tree
import (
"bufio"
"bytes"
"cmp"
"crypto/md5"
"errors"
"fmt"
@ -14,10 +13,10 @@ import (
"path"
"path/filepath"
"regexp"
"slices"
"strings"
abcex "g.arns.lt/zordsdavini/abcex/v4"
"golang.org/x/exp/slices"
)
type Config struct {
@ -569,16 +568,7 @@ FILE_LOOP:
if err != nil {
return tree, err
}
if nextFile.Id == "" {
continue
}
tree.Files = append(tree.Files, nextFile)
slices.SortFunc(tree.Files, func(a, b File) int {
if len(a.Id) == len(b.Id) {
return strings.Compare(a.Id, b.Id)
}
return cmp.Compare(len(a.Id), len(b.Id))
})
}
return tree, nil

View file

@ -22,7 +22,6 @@ func prepare(t *testing.T) Config {
"__a",
make(map[string]func() string),
[]string{"exclude_[0-9]+.bin"},
map[string]AppCallback{},
)
err = PopulateTree("./testdata/sunny1", []string{}, config)
@ -39,7 +38,6 @@ func TestFromNotExistingDirectory(t *testing.T) {
"__a",
make(map[string]func() string),
[]string{},
map[string]AppCallback{},
)
_, err := BuildTree("./testing/i_dont_exist", []string{}, config)