diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-23 23:50:04 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-23 23:50:04 +0300 |
| commit | 8eab33b5f2ab4d77f5df24862a1e7dbec3e4cf7f (patch) | |
| tree | 47fca9a21ad20e2933d264d015c52b531f35a306 | |
| parent | 923d5d9bf89eb5116e1236b06ad59f25792404ce (diff) | |
doc: fix misleading comment about constants provider in NewOperations
NewOperations never accepts a constants provider parameter; it always
creates one via NewConstants(). The old comment implied the caller
could provide one through the constructor, which was inaccurate.
| -rw-r--r-- | internal/rpn/operations.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/rpn/operations.go b/internal/rpn/operations.go index 62c8248..99b8e6b 100644 --- a/internal/rpn/operations.go +++ b/internal/rpn/operations.go @@ -23,8 +23,8 @@ type Operations struct { var _ Operator = (*Operations)(nil) // NewOperations creates a new Operations instance with the given variable store. +// Creates a new ConstantsProvider internally; use SetConstants to replace it. // If no registry is provided, defaults to the global MetricRegistry. -// If no constants provider is provided, creates a new one. func NewOperations(vars VariableStore, reg ...*MetricRegistry) *Operations { consts := NewConstants() r := GetMetricRegistry() |
