1
0
mirror of https://github.com/aclindsa/ofxgo.git synced 2025-06-15 05:58:38 -04:00

Make the OFX spec version an 'enum'

This commit is contained in:
2017-04-17 10:54:20 -04:00
parent 94f49640b4
commit 0eba6741f2
14 changed files with 181 additions and 43 deletions

View File

@ -121,10 +121,15 @@ func detectSettings() {
const anonymous = "anonymous00000000000000000000000"
func tryProfile(appID, appVer, version string, noindent bool) bool {
ver, err := ofxgo.NewOfxVersion(version)
if err != nil {
fmt.Println("Error creating new OfxVersion enum:", err)
os.Exit(1)
}
var client = ofxgo.Client{
AppID: appID,
AppVer: appVer,
SpecVersion: version,
SpecVersion: ver,
NoIndent: noindent,
}

View File

@ -1,14 +1,21 @@
package main
import (
"fmt"
"github.com/aclindsa/ofxgo"
"os"
)
func newRequest() (*ofxgo.Client, *ofxgo.Request) {
ver, err := ofxgo.NewOfxVersion(ofxVersion)
if err != nil {
fmt.Println("Error creating new OfxVersion enum:", err)
os.Exit(1)
}
var client = ofxgo.Client{
AppID: appID,
AppVer: appVer,
SpecVersion: ofxVersion,
SpecVersion: ver,
NoIndent: noIndentRequests,
}