can handle no prior file

main
Bel LaPointe 2023-10-25 05:19:58 -06:00
parent ff815a7169
commit 9f8614d032
1 changed files with 3 additions and 0 deletions

View File

@ -46,6 +46,9 @@ func (files Files) transactions() ([]transaction, error) {
func (files Files) _transactions(file string) ([]transaction, error) { func (files Files) _transactions(file string) ([]transaction, error) {
f, err := os.Open(string(file)) f, err := os.Open(string(file))
if os.IsNotExist(err) {
return nil, nil
}
if err != nil { if err != nil {
return nil, err return nil, err
} }