diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-24 00:14:11 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-24 00:14:11 +0300 |
| commit | 5883d15e7cef6e0cfa95a2fde273877890296378 (patch) | |
| tree | a52625a233e31722c6a79baaac92b38ec55d6fec | |
| parent | 573792cbd153d9c7318c180e6a1e4eadf0e5bd3f (diff) | |
docs: fix inaccurate comments in operations_interfaces.go
- SetMode: corrected comment from 'number formatting' to accurately
reflect that CalculationMode controls calculation precision type
(FloatMode, RationalMode), not formatting.
- Operator design note: added 'custom metric commands' to the list of
method categories mixed into the interface, matching the actual
CustomList, CustomDefine, and CustomUndefine methods.
| -rw-r--r-- | internal/rpn/operations_interfaces.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/rpn/operations_interfaces.go b/internal/rpn/operations_interfaces.go index 0f461f0..6076ec0 100644 --- a/internal/rpn/operations_interfaces.go +++ b/internal/rpn/operations_interfaces.go @@ -72,10 +72,10 @@ type PowerIntOperator interface { // This allows RPN to depend on an abstraction instead of the concrete Operations type. // // Design note: Operator intentionally mixes behavioral methods (arithmetic, stack, -// boolean ops) with configuration methods (SetMode, SetPrefixMode, GetPrefixMode) -// and metric command handlers. Per ISP this could be split, but RPN is the sole -// client and splitting would add indirection without practical benefit. The -// concrete *Operations type satisfies this interface exclusively. +// boolean ops) with configuration methods (SetMode, SetPrefixMode, GetPrefixMode), +// metric command handlers, and custom metric commands. Per ISP this could be split, +// but RPN is the sole client and splitting would add indirection without practical +// benefit. The concrete *Operations type satisfies this interface exclusively. type Operator interface { ArithmeticOperator BooleanOperator @@ -84,7 +84,7 @@ type Operator interface { VariableOperator ConstantOperator PowerIntOperator - // SetMode sets the calculation mode for number formatting + // SetMode sets the calculation mode (e.g., FloatMode, RationalMode). SetMode(CalculationMode) // SetPrefixMode sets the prefix mode for data size calculations SetPrefixMode(PrefixMode) |
