ax(mining): rename opts/opt to options/option in NewFileRepository
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run

AX Principle 1: predictable names over short names.
`opts` and `opt` are abbreviations — `options` and `option` are unambiguous.

Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
Claude 2026-04-02 08:25:14 +01:00
parent 40b57849ff
commit f9ecce2e86
No known key found for this signature in database
GPG key ID: AF404715446AEB41

View file

@ -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
}