aboutsummaryrefslogtreecommitdiff
path: root/object/tree/path_prefix.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-04-02 06:23:30 +0000
committerGravatar Runxi Yu2026-04-02 06:28:39 +0000
commita041d523de389b65b98a5373a8034041db2a8d83 (patch)
tree7b423dc735f463be616045f2c3c2095a7737aca7 /object/tree/path_prefix.go
parentresearch: Add dynamic pack resources (diff)
signatureNo signature
*: Remove
Diffstat (limited to 'object/tree/path_prefix.go')
-rw-r--r--object/tree/path_prefix.go19
1 files changed, 0 insertions, 19 deletions
diff --git a/object/tree/path_prefix.go b/object/tree/path_prefix.go
deleted file mode 100644
index ed658cee..00000000
--- a/object/tree/path_prefix.go
+++ /dev/null
@@ -1,19 +0,0 @@
-package tree
-
-import (
- "bytes"
- "slices"
-)
-
-// HasPathPrefix reports whether path begins with prefix as whole components.
-func HasPathPrefix(path, prefix [][]byte) bool {
- if len(prefix) == 0 {
- return true
- }
-
- if len(path) < len(prefix) {
- return false
- }
-
- return slices.EqualFunc(path[:len(prefix)], prefix, bytes.Equal)
-}