Skip to content

Commit 5bad4ed

Browse files
committed
Fix errors
1 parent 8d974c9 commit 5bad4ed

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

pkg/inserter/js_inserter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func (j *JSInserter) Execute(ctx context.Context, cn, path string) error {
6969
return nil
7070
}
7171

72-
func (j *JSInserter) CreateItem(ctx context.Context, path []string, items []JSONModelItem, collectionIndexes []int) error {
72+
func (j *JSInserter) CreateItem(ctx context.Context, path []string, items []ModelItem, collectionIndexes []int) error {
7373
for idx, parentItem := range items {
7474
nowIndexes := append(collectionIndexes, idx)
7575
docPath := strings.Join(path, "/")

pkg/inserter/json_inserter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func (j *JSONInserter) Execute(ctx context.Context, cn, path string) error {
4545
return nil
4646
}
4747

48-
func (j *JSONInserter) CreateItem(ctx context.Context, path []string, items []JSONModelItem, collectionIndexes []int) error {
48+
func (j *JSONInserter) CreateItem(ctx context.Context, path []string, items []ModelItem, collectionIndexes []int) error {
4949
for idx, parentItem := range items {
5050
nowIndexes := append(collectionIndexes, idx)
5151
docPath := strings.Join(path, "/")

pkg/inserter/model.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ type Model struct {
88

99
// ModelItem - Modelが持つアイテム
1010
type ModelItem struct {
11-
Ref string `json:"ref" yaml:"ref"`
12-
Payload map[string]interface{} `json:"payload" yaml:"payload"`
11+
Ref string `json:"ref" yaml:"ref"`
12+
Payload map[string]interface{} `json:"payload" yaml:"payload"`
13+
SubCollections map[string][]ModelItem `json:"sub_collections"`
1314
}

0 commit comments

Comments
 (0)