fix: cli.CLIOptions is repetitive
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user