summaryrefslogtreecommitdiff
path: root/internal/rpn/operations.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-05-24 18:50:00 +0300
committerPaul Buetow <paul@buetow.org>2026-05-24 18:50:00 +0300
commitdc89fa2bbcdea7c8847828f64be5e46ddded33fb (patch)
tree67dd57478d39d9e75ccfcb576f5651bf53896379 /internal/rpn/operations.go
parent4188db97bcb771c1c8790ddbac2db3f9ee8884c3 (diff)
fix(rpn): change variadic NewRPN/NewOperations to single optional MetricReader (task ok)
Diffstat (limited to 'internal/rpn/operations.go')
-rw-r--r--internal/rpn/operations.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/rpn/operations.go b/internal/rpn/operations.go
index 989ce87..3a85ee5 100644
--- a/internal/rpn/operations.go
+++ b/internal/rpn/operations.go
@@ -38,10 +38,10 @@ var (
// NewOperations creates a new Operations instance with the given variable store.
// Does not create a ConstantsProvider internally; caller must use SetConstants.
// If no registry is provided, defaults to the global MetricRegistry.
-func NewOperations(vars VariableStore, reg ...MetricReader) *Operations {
+func NewOperations(vars VariableStore, reg MetricReader) *Operations {
r := MetricReader(GetMetricRegistry())
- if len(reg) > 0 && reg[0] != nil {
- r = reg[0]
+ if reg != nil {
+ r = reg
}
return &Operations{
vars: vars,