mirror of
https://github.com/aclindsa/ofxgo.git
synced 2024-10-30 05:20:05 -04:00
cmd/ofx: Add option to use carriage returns for requests
This commit is contained in:
parent
10edd94920
commit
6807c93e0e
@ -22,6 +22,7 @@ func (c *command) usage() {
|
||||
// flags common to all server transactions
|
||||
var serverURL, username, password, org, fid, appID, appVer, ofxVersion, clientUID string
|
||||
var noIndentRequests bool
|
||||
var carriageReturn bool
|
||||
|
||||
func defineServerFlags(f *flag.FlagSet) {
|
||||
f.StringVar(&serverURL, "url", "", "Financial institution's OFX Server URL (see ofxhome.com if you don't know it)")
|
||||
@ -34,6 +35,7 @@ func defineServerFlags(f *flag.FlagSet) {
|
||||
f.StringVar(&ofxVersion, "ofxversion", "203", "OFX version to use")
|
||||
f.StringVar(&clientUID, "clientuid", "", "Client UID (only required by a few FIs, like Chase)")
|
||||
f.BoolVar(&noIndentRequests, "noindent", false, "Don't indent OFX requests")
|
||||
f.BoolVar(&carriageReturn, "carriagereturn", false, "Use carriage return as line separator")
|
||||
}
|
||||
|
||||
func checkServerFlags() bool {
|
||||
|
@ -14,10 +14,11 @@ func newRequest() (ofxgo.Client, *ofxgo.Request) {
|
||||
}
|
||||
var client = ofxgo.GetClient(serverURL,
|
||||
&ofxgo.BasicClient{
|
||||
AppID: appID,
|
||||
AppVer: appVer,
|
||||
SpecVersion: ver,
|
||||
NoIndent: noIndentRequests,
|
||||
AppID: appID,
|
||||
AppVer: appVer,
|
||||
SpecVersion: ver,
|
||||
NoIndent: noIndentRequests,
|
||||
CarriageReturn: carriageReturn,
|
||||
})
|
||||
|
||||
var query ofxgo.Request
|
||||
|
Loading…
Reference in New Issue
Block a user