aboutsummaryrefslogtreecommitdiff
path: root/refstore/chain/new.go
blob: f8bdcb13650dc630a07709fc9c7a1df81011f3fe (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
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...),
	}
}