aboutsummaryrefslogtreecommitdiff
path: root/refstore/chain/new.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-22 23:10:37 +0000
committerGravatar Runxi Yu2026-03-22 23:13:19 +0000
commitab6f8dde0cdc554084c4455c76feef0099db70d9 (patch)
tree6c6a207d6094a8d99b1b1b43f8bdee93c19871e0 /refstore/chain/new.go
parentcommitgraph: Tighten docs and use a value-ish Filter return (diff)
signatureNo signature
*: Fixup ownership of compositional backends v0.1.88
Diffstat (limited to 'refstore/chain/new.go')
-rw-r--r--refstore/chain/new.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/refstore/chain/new.go b/refstore/chain/new.go
index ebf5e2bb..f8bdcb13 100644
--- a/refstore/chain/new.go
+++ b/refstore/chain/new.go
@@ -3,6 +3,9 @@ package chain
import "codeberg.org/lindenii/furgit/refstore"
// New creates an ordered reference store chain.
+//
+// The provided backends must be non-nil and distinct.
+// Chain borrows the provided backends and does not close them in Close.
func New(backends ...refstore.ReadingStore) *Chain {
return &Chain{
backends: append([]refstore.ReadingStore(nil), backends...),