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