fixes #8 type and version added to json export
This commit is contained in:
@@ -28,6 +28,7 @@ func DefaultConf() *Conf {
|
|||||||
type Conf struct {
|
type Conf struct {
|
||||||
Title string `json:"title"`
|
Title string `json:"title"`
|
||||||
Version string `json:"version"`
|
Version string `json:"version"`
|
||||||
|
Type string `json:"type"`
|
||||||
Values []Value `json:"values"`
|
Values []Value `json:"values"`
|
||||||
Areas []Area `json:"areas"`
|
Areas []Area `json:"areas"`
|
||||||
Rating Rating `json:"rating"`
|
Rating Rating `json:"rating"`
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"title": "Good Balance Calculator",
|
"title": "Good Balance Calculator",
|
||||||
"version": "5.04",
|
"version": "5.04",
|
||||||
|
"type": "Full",
|
||||||
"values": [
|
"values": [
|
||||||
{
|
{
|
||||||
"sheet": 2,
|
"sheet": 2,
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ func XLSX(r io.Reader, conf *Conf) (*ecalc.Ecalc, error) {
|
|||||||
if conf == nil {
|
if conf == nil {
|
||||||
conf = DefaultConf()
|
conf = DefaultConf()
|
||||||
}
|
}
|
||||||
|
eBalance.Version = conf.Version
|
||||||
|
eBalance.Type = conf.Type
|
||||||
xFile, err := excelize.OpenReader(r)
|
xFile, err := excelize.OpenReader(r)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("XLSX.OpenReader: %w", err)
|
return nil, fmt.Errorf("XLSX.OpenReader: %w", err)
|
||||||
|
|||||||
Reference in New Issue
Block a user