From da6764565629b0376f8d505bdd9d5fdc9c567f93 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Tue, 31 Mar 2026 02:40:34 +0000 Subject: ref/store: Simplify names --- ref/store/batch_store.go | 4 ++-- ref/store/chain/chain.go | 2 +- ref/store/chain/new.go | 4 ++-- ref/store/files/store.go | 6 +++--- ref/store/reading.go | 4 ++-- ref/store/transactional_store.go | 6 +++--- 6 files changed, 13 insertions(+), 13 deletions(-) (limited to 'ref') diff --git a/ref/store/batch_store.go b/ref/store/batch_store.go index b6cd9adf..725a05e5 100644 --- a/ref/store/batch_store.go +++ b/ref/store/batch_store.go @@ -1,7 +1,7 @@ package refstore -// BatchStore begins non-atomic reference batches. -type BatchStore interface { +// Batcher begins non-atomic reference batches. +type Batcher interface { // BeginBatch creates one new queued batch. // // Labels: Life-Parent. diff --git a/ref/store/chain/chain.go b/ref/store/chain/chain.go index 302d7f88..a332f64c 100644 --- a/ref/store/chain/chain.go +++ b/ref/store/chain/chain.go @@ -8,5 +8,5 @@ import refstore "codeberg.org/lindenii/furgit/ref/store" // // Labels: Close-Caller. type Chain struct { - backends []refstore.ReadingStore + backends []refstore.Reader } diff --git a/ref/store/chain/new.go b/ref/store/chain/new.go index 2b720e48..1c8a3a28 100644 --- a/ref/store/chain/new.go +++ b/ref/store/chain/new.go @@ -7,8 +7,8 @@ import refstore "codeberg.org/lindenii/furgit/ref/store" // The provided backends must be non-nil and distinct. // // Labels: Deps-Borrowed, Life-Parent. -func New(backends ...refstore.ReadingStore) *Chain { +func New(backends ...refstore.Reader) *Chain { return &Chain{ - backends: append([]refstore.ReadingStore(nil), backends...), + backends: append([]refstore.Reader(nil), backends...), } } diff --git a/ref/store/files/store.go b/ref/store/files/store.go index 9e548af5..66d46d06 100644 --- a/ref/store/files/store.go +++ b/ref/store/files/store.go @@ -25,7 +25,7 @@ type Store struct { } var ( - _ refstore.ReadingStore = (*Store)(nil) - _ refstore.TransactionalStore = (*Store)(nil) - _ refstore.BatchStore = (*Store)(nil) + _ refstore.Reader = (*Store)(nil) + _ refstore.Transactioner = (*Store)(nil) + _ refstore.Batcher = (*Store)(nil) ) diff --git a/ref/store/reading.go b/ref/store/reading.go index 07814c00..a9e2ad49 100644 --- a/ref/store/reading.go +++ b/ref/store/reading.go @@ -2,10 +2,10 @@ package refstore import "codeberg.org/lindenii/furgit/ref" -// ReadingStore reads Git references. +// Reader reads Git references. // // Labels: MT-Safe. -type ReadingStore interface { +type Reader interface { // Resolve resolves a reference name to either a symbolic or detached ref. // // Implementations should return value forms ([ref.Detached] or [ref.Symbolic]), diff --git a/ref/store/transactional_store.go b/ref/store/transactional_store.go index 8a061f54..10f4543a 100644 --- a/ref/store/transactional_store.go +++ b/ref/store/transactional_store.go @@ -1,11 +1,11 @@ package refstore -// TransactionalStore begins atomic reference transactions. +// Transactioner begins atomic reference transactions. // // Not every readable reference store is writable. Implementations should only -// satisfy TransactionalStore when they can stage and commit reference updates +// satisfy Transactioner when they can stage and commit reference updates // atomically within that backend. -type TransactionalStore interface { +type Transactioner interface { // BeginTransaction creates one new mutable transaction. // // Labels: Life-Parent. -- cgit v1.3.1-10-gc9f91