From dc89fa2bbcdea7c8847828f64be5e46ddded33fb Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 24 May 2026 18:50:00 +0300 Subject: fix(rpn): change variadic NewRPN/NewOperations to single optional MetricReader (task ok) --- internal/rpn/operations.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'internal/rpn/operations.go') 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, -- cgit v1.2.3