summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-03-20 22:09:19 +0200
committerPaul Buetow <paul@buetow.org>2026-03-20 22:09:19 +0200
commit77c21d86ea4c9b8621af1dcbd64acec7b65706a3 (patch)
tree568f9fa09cc06db113cc57f47e3447e7e3427cb5 /cmd
parentc62aef166f1163524fe5d63a5c00571a75731dcf (diff)
refactor: update Operations to use VariableStore interface
- Changed Operations.vars from *Variables to VariableStore interface - Changed NewOperations to accept VariableStore interface - Changed RPN.vars from *Variables to VariableStore interface - Changed NewRPN to accept VariableStore interface - Removed type assertions in main.go and repl.go - Added FormatVariables to VariableStore interface - All tests pass, build successful
Diffstat (limited to 'cmd')
-rw-r--r--cmd/perc/main.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/perc/main.go b/cmd/perc/main.go
index 2cee268..848428e 100644
--- a/cmd/perc/main.go
+++ b/cmd/perc/main.go
@@ -73,7 +73,7 @@ func runCommand(args []string) (string, error) {
// runRPN parses and evaluates an RPN expression
func runRPN(input string) (string, error) {
- vars := rpn.NewVariables().(*rpn.Variables)
+ vars := rpn.NewVariables()
rpnCalc := rpn.NewRPN(vars)
return rpnCalc.ParseAndEvaluate(input)
}