mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
tools: update dependencies and use tree set (#16974)
* tools: bump go mod deps for tools module * tools: use treeset in tools/missing
This commit is contained in:
@@ -177,7 +177,7 @@ func skip(p string) bool {
|
||||
}
|
||||
|
||||
func inCode(root string) ([]string, error) {
|
||||
pkgs := set.New[string](100)
|
||||
pkgs := set.NewTreeSet[string, set.Compare[string]](set.Cmp[string])
|
||||
|
||||
err := filepath.Walk(root, func(path string, info fs.FileInfo, err error) error {
|
||||
if info.IsDir() {
|
||||
@@ -200,7 +200,5 @@ func inCode(root string) ([]string, error) {
|
||||
|
||||
pkgs.Remove(".") // main
|
||||
|
||||
packages := pkgs.List()
|
||||
sort.Strings(packages)
|
||||
return packages, nil
|
||||
return pkgs.Slice(), nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user