fix: unbound substitutions, explanation tag
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user