Skip to content

Commit 4b4ed81

Browse files
committed
Fix vet errors
1 parent 8fff56d commit 4b4ed81

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

cmd/demo/account.go

+12-12
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func (a *AccountGenerator) Transactions(ofxVersionStr string, txnUID ofxgo.UID,
7373
Version: ofxVersion,
7474
Signon: ofxgo.SignonResponse{
7575
Status: successStatus,
76-
DtServer: ofxgo.Date{now},
76+
DtServer: ofxgo.Date{Time: now},
7777
Language: ofxgo.String("ENG"),
7878
Org: ofxgo.String(a.Org),
7979
Fid: ofxgo.String(a.FID),
@@ -85,16 +85,16 @@ func (a *AccountGenerator) Transactions(ofxVersionStr string, txnUID ofxgo.UID,
8585
TrnUID: txnUID,
8686
Status: successStatus,
8787
CltCookie: ofxgo.String(cookie),
88-
CurDef: ofxgo.CurrSymbol{currency.USD},
89-
DtAsOf: ofxgo.Date{now},
88+
CurDef: ofxgo.CurrSymbol{Unit: currency.USD},
89+
DtAsOf: ofxgo.Date{Time: now},
9090
BankAcctFrom: ofxgo.BankAcct{
9191
BankID: ofxgo.String("routing number"),
9292
AcctID: ofxgo.String("account number"),
9393
AcctType: ofxgo.AcctTypeChecking,
9494
},
9595
BankTranList: &ofxgo.TransactionList{
96-
DtStart: ofxgo.Date{start},
97-
DtEnd: ofxgo.Date{end},
96+
DtStart: ofxgo.Date{Time: start},
97+
DtEnd: ofxgo.Date{Time: end},
9898
Transactions: a.transactions(start, end),
9999
},
100100
})
@@ -103,14 +103,14 @@ func (a *AccountGenerator) Transactions(ofxVersionStr string, txnUID ofxgo.UID,
103103
TrnUID: txnUID,
104104
Status: successStatus,
105105
CltCookie: ofxgo.String(cookie),
106-
CurDef: ofxgo.CurrSymbol{currency.USD},
107-
DtAsOf: ofxgo.Date{now},
106+
CurDef: ofxgo.CurrSymbol{Unit: currency.USD},
107+
DtAsOf: ofxgo.Date{Time: now},
108108
CCAcctFrom: ofxgo.CCAcct{
109109
AcctID: ofxgo.String("account number"),
110110
},
111111
BankTranList: &ofxgo.TransactionList{
112-
DtStart: ofxgo.Date{start},
113-
DtEnd: ofxgo.Date{end},
112+
DtStart: ofxgo.Date{Time: start},
113+
DtEnd: ofxgo.Date{Time: end},
114114
Transactions: a.transactions(start, end),
115115
},
116116
})
@@ -143,10 +143,10 @@ func (a *AccountGenerator) transactions(start, end time.Time) []ofxgo.Transactio
143143
txnSeed := seed * uint64(date.Month()) * uint64(date.Day())
144144
randTxn := newRandTransaction(date, txnSeed)
145145
txn := ofxgo.Transaction{
146-
DtPosted: ofxgo.Date{randTxn.Date},
147-
TrnAmt: ofxgo.Amount{*randTxn.Amount.Rat()},
146+
DtPosted: ofxgo.Date{Time: randTxn.Date},
147+
TrnAmt: ofxgo.Amount{Rat: *randTxn.Amount.Rat()},
148148
FiTID: ofxgo.String(randTxn.ID),
149-
Currency: &ofxgo.Currency{CurSym: ofxgo.CurrSymbol{currency.USD}},
149+
Currency: &ofxgo.Currency{CurSym: ofxgo.CurrSymbol{Unit: currency.USD}},
150150
}
151151
if randTxn.Amount.IsNegative() {
152152
txn.TrnType = ofxgo.TrnTypeDebit

0 commit comments

Comments
 (0)