diff --git a/transactions/process.go b/transactions/process.go index b9a8f7d..dd05408 100644 --- a/transactions/process.go +++ b/transactions/process.go @@ -10,11 +10,15 @@ func Process(revolutFile string, aibFile string, startDate time.Time) { fmt.Println("Excluding transactions on and before ", startDate) report := NewReport(startDate) - revolutLines := utils.ReadInputFile(revolutFile) - aibLines := utils.ReadInputFile(aibFile) + if revolutFile != "" { + revolutLines := utils.ReadInputFile(revolutFile) + report = report.AddTransactions(revolutLines, true) + } - report = report.AddTransactions(revolutLines, true) - report = report.AddTransactions(aibLines, false) + if aibFile != "" { + aibLines := utils.ReadInputFile(aibFile) + report = report.AddTransactions(aibLines, false) + } report.Sort() report.Output()