fix: cli.CLIOptions is repetitive

This commit is contained in:
2025-12-25 23:50:17 -05:00
parent 32b1ba12f4
commit 963435c657

View File

@@ -6,7 +6,7 @@ import (
)
// Arguments given to program.
type CLIOptions struct {
type Options struct {
// The source code given to the program.
Input string
// Whether or not to print debug logs.
@@ -16,7 +16,7 @@ type CLIOptions struct {
}
// Extract the program configuration from the command-line arguments.
func ParseOptions() (*CLIOptions, error) {
func ParseOptions() (*Options, error) {
// Parse flags.
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.")
@@ -29,7 +29,7 @@ func ParseOptions() (*CLIOptions, error) {
return nil, fmt.Errorf("More than 1 command-line argument.")
}
return &CLIOptions{
return &Options{
Input: flag.Arg(0),
Verbose: *verbose,
Explanation: *explanation,