diff options
Diffstat (limited to 'ldd/path.go')
| -rw-r--r-- | ldd/path.go | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/ldd/path.go b/ldd/path.go deleted file mode 100644 index c8290c34..00000000 --- a/ldd/path.go +++ /dev/null @@ -1,20 +0,0 @@ -package ldd - -import ( - "hakurei.app/container/check" -) - -// Path returns a deterministic, deduplicated slice of absolute directory paths in entries. -func Path(entries []*Entry) []*check.Absolute { - p := make([]*check.Absolute, 0, len(entries)*2) - for _, entry := range entries { - if a, err := check.NewAbs(entry.Path); err == nil { - p = append(p, a.Dir()) - } - if a, err := check.NewAbs(entry.Name); err == nil { - p = append(p, a.Dir()) - } - } - check.SortAbs(p) - return check.CompactAbs(p) -} |
