mirror of
https://github.com/aclindsa/ofxgo.git
synced 2025-07-01 19:58:37 -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:
@ -6,7 +6,6 @@ import (
|
||||
"github.com/aclindsa/ofxgo"
|
||||
"io"
|
||||
"os"
|
||||
"time"
|
||||
)
|
||||
|
||||
var ccDownloadCommand = Command{
|
||||
@ -48,8 +47,6 @@ func ccDownload() {
|
||||
CCAcctFrom: ofxgo.CCAcct{
|
||||
AcctId: ofxgo.String(acctId),
|
||||
},
|
||||
DtStart: ofxgo.Date(time.Now().AddDate(-1, 0, 0)),
|
||||
DtEnd: ofxgo.Date(time.Now()),
|
||||
Include: true,
|
||||
}
|
||||
query.CreditCards = append(query.CreditCards, &statementRequest)
|
||||
|
Reference in New Issue
Block a user