Implement Export in YNAB-Format #15

Merged
jacob1123 merged 10 commits from ynab-export into master 2022-02-23 22:18:02 +01:00
Showing only changes of commit 34b6e450de - Show all commits

View File

@ -93,7 +93,7 @@ func (n Numeric) Add(other Numeric) Numeric {
} }
func (n Numeric) String() string { func (n Numeric) String() string {
if n.Int.Int64() == 0 { if n.Int == nil || n.Int.Int64() == 0 {
return "0" return "0"
} }
@ -130,7 +130,7 @@ func (n Numeric) String() string {
} }
func (n Numeric) MarshalJSON() ([]byte, error) { func (n Numeric) MarshalJSON() ([]byte, error) {
if n.Int.Int64() == 0 { if n.Int == nil || n.Int.Int64() == 0 {
return []byte("0"), nil return []byte("0"), nil
} }