1
0
mirror of https://github.com/aclindsa/moneygo.git synced 2025-07-01 12:08:37 -04:00

Add Initial Gnucash importing

There are still a number of bugs, but the basic functionality is there
This commit is contained in:
2016-02-15 11:28:44 -05:00
parent fcf6b2f1a4
commit 9e26b30bdc
9 changed files with 571 additions and 162 deletions

View File

@ -2,7 +2,7 @@ package main
import (
"encoding/json"
"errors"
"fmt"
"log"
"net/http"
)
@ -55703,7 +55703,16 @@ func GetSecurityByName(name string) (*Security, error) {
return value, nil
}
}
return nil, errors.New("Invalid Security Name")
return nil, fmt.Errorf("Invalid Security Name: \"%s\"", name)
}
func GetSecurityByNameAndType(name string, _type int64) (*Security, error) {
for _, value := range security_map {
if value.Name == name && value.Type == _type {
return value, nil
}
}
return nil, fmt.Errorf("Invalid Security Name (%s) or Type (%d)", name, _type)
}
func GetSecurities() []*Security {