mirror of
https://github.com/aclindsa/ofxgo.git
synced 2024-10-30 05:20:05 -04:00
Add missing handling for -dryrun
flag in command-line client
This flag was only handled for the `download-profile` command. Add the same handling for all other commands (except `detect-settings`).
This commit is contained in:
parent
afd882f7d2
commit
1f657a5d18
@ -64,6 +64,11 @@ func download() {
|
|||||||
|
|
||||||
query.Bank = append(query.Bank, &statementRequest)
|
query.Bank = append(query.Bank, &statementRequest)
|
||||||
|
|
||||||
|
if dryrun {
|
||||||
|
printRequest(client, query)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
response, err := client.RequestNoParse(query)
|
response, err := client.RequestNoParse(query)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("Error requesting account statement:", err)
|
fmt.Println("Error requesting account statement:", err)
|
||||||
|
@ -49,6 +49,11 @@ func bankTransactions() {
|
|||||||
|
|
||||||
query.Bank = append(query.Bank, &statementRequest)
|
query.Bank = append(query.Bank, &statementRequest)
|
||||||
|
|
||||||
|
if dryrun {
|
||||||
|
printRequest(client, query)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
response, err := client.Request(query)
|
response, err := client.Request(query)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("Error requesting account statement:", err)
|
fmt.Println("Error requesting account statement:", err)
|
||||||
|
@ -51,6 +51,11 @@ func ccDownload() {
|
|||||||
}
|
}
|
||||||
query.CreditCard = append(query.CreditCard, &statementRequest)
|
query.CreditCard = append(query.CreditCard, &statementRequest)
|
||||||
|
|
||||||
|
if dryrun {
|
||||||
|
printRequest(client, query)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
response, err := client.RequestNoParse(query)
|
response, err := client.RequestNoParse(query)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -38,6 +38,11 @@ func ccTransactions() {
|
|||||||
}
|
}
|
||||||
query.CreditCard = append(query.CreditCard, &statementRequest)
|
query.CreditCard = append(query.CreditCard, &statementRequest)
|
||||||
|
|
||||||
|
if dryrun {
|
||||||
|
printRequest(client, query)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
response, err := client.Request(query)
|
response, err := client.Request(query)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("Error requesting account statement:", err)
|
fmt.Println("Error requesting account statement:", err)
|
||||||
|
@ -35,6 +35,11 @@ func getAccounts() {
|
|||||||
}
|
}
|
||||||
query.Signup = append(query.Signup, &acctInfo)
|
query.Signup = append(query.Signup, &acctInfo)
|
||||||
|
|
||||||
|
if dryrun {
|
||||||
|
printRequest(client, query)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
response, err := client.Request(query)
|
response, err := client.Request(query)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("Error requesting account information:", err)
|
fmt.Println("Error requesting account information:", err)
|
||||||
|
@ -60,6 +60,11 @@ func invDownload() {
|
|||||||
}
|
}
|
||||||
query.InvStmt = append(query.InvStmt, &statementRequest)
|
query.InvStmt = append(query.InvStmt, &statementRequest)
|
||||||
|
|
||||||
|
if dryrun {
|
||||||
|
printRequest(client, query)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
response, err := client.RequestNoParse(query)
|
response, err := client.RequestNoParse(query)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -45,6 +45,11 @@ func invTransactions() {
|
|||||||
}
|
}
|
||||||
query.InvStmt = append(query.InvStmt, &statementRequest)
|
query.InvStmt = append(query.InvStmt, &statementRequest)
|
||||||
|
|
||||||
|
if dryrun {
|
||||||
|
printRequest(client, query)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
response, err := client.Request(query)
|
response, err := client.Request(query)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
|
Loading…
Reference in New Issue
Block a user