basic conf for loader
This commit is contained in:
43
cmd/test2/conf.json
Normal file
43
cmd/test2/conf.json
Normal file
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"title": "",
|
||||
"version": "",
|
||||
"values": [
|
||||
{
|
||||
"sheet": 0,
|
||||
"cell": "",
|
||||
"type": "",
|
||||
"struct": "",
|
||||
"field": "",
|
||||
"default": ""
|
||||
}
|
||||
],
|
||||
"areas": [
|
||||
{
|
||||
"sheet": 0,
|
||||
"start_row": 0,
|
||||
"end_row": 0,
|
||||
"struct": "",
|
||||
"cols": [
|
||||
{
|
||||
"col": "",
|
||||
"field": "",
|
||||
"type": "",
|
||||
"default": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"rating": {
|
||||
"sheet": 0,
|
||||
"start_row": 0,
|
||||
"end_row": 0,
|
||||
"points_col": "",
|
||||
"max_points_col": "",
|
||||
"id_col": "",
|
||||
"short_name_col": "",
|
||||
"name_col": "",
|
||||
"estimations_col": "",
|
||||
"weight_col": "",
|
||||
"selected_by_user_col": ""
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,9 @@ package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"git.ecogood.org/andreas.schroepfer/excelConverter/pkg/loader"
|
||||
excelize "github.com/360EntSecGroup-Skylar/excelize/v2"
|
||||
)
|
||||
|
||||
@@ -12,4 +14,15 @@ func main() {
|
||||
sheets := xFile.GetSheetMap()
|
||||
rows, _ := xFile.GetRows(sheets[4])
|
||||
fmt.Printf("%#v", rows)
|
||||
c := loader.Conf{}
|
||||
c.Values = append(c.Values, loader.Value{})
|
||||
c.Areas = append(c.Areas, loader.Area{
|
||||
Cols: []loader.AreaCol{
|
||||
loader.AreaCol{},
|
||||
},
|
||||
})
|
||||
fd, err := os.OpenFile("conf.json", os.O_CREATE, 0777)
|
||||
fmt.Println(err)
|
||||
defer fd.Close()
|
||||
c.EncodeJSON(fd)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user