feat: add output flag with Destination interface.
Added -o flag to write results to files using a new Destination interface. Changes: - Add Destination interface with StdoutDestination and FileDestination implementations. - Add -o flag to CLI parser for output file specification. - Update Config to use Destination instead of direct output handling. - Refactor main to use Destination.Write() for result output.
This commit is contained in:
@@ -3,9 +3,10 @@ package config
|
||||
|
||||
// Configuration settings for the program.
|
||||
type Config struct {
|
||||
Source Source // The source code given to the program.
|
||||
Verbose bool // Whether or not to print debug logs.
|
||||
Explanation bool // Whether or not to print an explanation of the reduction.
|
||||
Profile string // If not nil, print a CPU profile during execution.
|
||||
Statistics bool // Whether or not to print statistics.
|
||||
Source Source // The source code given to the program.
|
||||
Destination Destination // The destination for the final result.
|
||||
Verbose bool // Whether or not to print debug logs.
|
||||
Explanation bool // Whether or not to print an explanation of the reduction.
|
||||
Profile string // If not nil, print a CPU profile during execution.
|
||||
Statistics bool // Whether or not to print statistics.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user