From f9ecce2e863ea5b7db1543adf0fa26ce25611359 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Apr 2026 08:25:14 +0100 Subject: [PATCH] ax(mining): rename opts/opt to options/option in NewFileRepository MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AX Principle 1: predictable names over short names. `opts` and `opt` are abbreviations — `options` and `option` are unambiguous. Co-Authored-By: Charon --- pkg/mining/repository.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/mining/repository.go b/pkg/mining/repository.go index ae92431..a8c1b5a 100644 --- a/pkg/mining/repository.go +++ b/pkg/mining/repository.go @@ -39,13 +39,13 @@ func WithDefaults[T any](fn func() T) FileRepositoryOption[T] { } } -// NewFileRepository creates a new file-based repository. -func NewFileRepository[T any](path string, opts ...FileRepositoryOption[T]) *FileRepository[T] { +// repo := NewFileRepository[MinersConfig](path, WithDefaults(defaultMinersConfig)) +func NewFileRepository[T any](path string, options ...FileRepositoryOption[T]) *FileRepository[T] { r := &FileRepository[T]{ path: path, } - for _, opt := range opts { - opt(r) + for _, option := range options { + option(r) } return r }