fix: unbound substitutions, explanation tag

This commit is contained in:
2025-12-25 01:55:46 -05:00
parent a56ec808ec
commit 99703c2587
6 changed files with 82 additions and 23 deletions

View File

@@ -6,13 +6,15 @@ import (
)
type CLIOptions struct {
Input string
Verbose bool
Input string
Verbose bool
Explanation bool
}
func ParseOptions(args []string) (*CLIOptions, error) {
// Parse flags and arguments.
verbose := flag.Bool("v", false, "Verbosity. If set, the program will print logs.")
explanation := flag.Bool("x", false, "Explanation. Whether or not to show all reduction steps.")
flag.Parse()
if flag.NArg() == 0 {
@@ -22,7 +24,8 @@ func ParseOptions(args []string) (*CLIOptions, error) {
}
return &CLIOptions{
Input: flag.Arg(0),
Verbose: *verbose,
Input: flag.Arg(0),
Verbose: *verbose,
Explanation: *explanation,
}, nil
}