1
0
mirror of https://github.com/aclindsa/ofxgo.git synced 2025-07-01 11:48:38 -04:00

Make optional struct fields pointers

This allows encoding/xml to properly comparison against nil to see if
they should be marshalled if the 'xml' tag contains ",omitempty" and for
users to test against nil to see if a field was present in the parsed
OFX.

This commit also fixes up cmd/ofx to use the new pointers.
This commit is contained in:
2017-03-29 05:31:01 -04:00
parent 119c01f99b
commit 1d8ba5c19a
11 changed files with 130 additions and 150 deletions

View File

@ -60,10 +60,10 @@ type SignonResponse struct {
Status Status `xml:"STATUS"`
DtServer Date `xml:"DTSERVER"`
UserKey String `xml:"USERKEY,omitempty"`
TsKeyExpire Date `xml:"TSKEYEXPIRE,omitempty"`
TsKeyExpire *Date `xml:"TSKEYEXPIRE,omitempty"`
Language String `xml:"LANGUAGE"`
DtProfUp Date `xml:"DTPROFUP,omitempty"`
DtAcctUp Date `xml:"DTACCTUP,omitempty"`
DtProfUp *Date `xml:"DTPROFUP,omitempty"`
DtAcctUp *Date `xml:"DTACCTUP,omitempty"`
Org String `xml:"FI>ORG"`
Fid String `xml:"FI>FID"`
SessCookie String `xml:"SESSCOOKIE,omitempty"`