diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-11-14 08:14:46 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-11-14 08:33:19 +0900 |
| commit | 690a0ed0d68e270e60bfe9c7cd575c4e986de83d (patch) | |
| tree | be14195bb5b4e64ddfceb19a4a09d0c5f9f3cec3 /ldd/path.go | |
| parent | a9d72a5eb19827ded874e359a99f91cc4d91f4b3 (diff) | |
ldd: decode from reader
This should reduce memory footprint of the parsing process and allow decoding part of the stream.
Signed-off-by: Ophestra <cat@gensokyo.uk>
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) -} |
