Skip to content

Commit

Permalink
Add flattened type support to Go code generator (#1302) (#1311)
Browse files Browse the repository at this point in the history
  • Loading branch information
ebeahan authored Mar 22, 2021
1 parent 50d37ef commit 43885ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.next.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ Thanks, you're awesome :-) -->

#### Improvements

* Go code generator now supports the `flattened` data type. #1302

#### Deprecated


Expand Down
2 changes: 1 addition & 1 deletion scripts/cmd/gocodegen/gocodegen.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ func goDataType(fieldName, elasticsearchDataType string) string {
return "time.Time"
case "boolean":
return "bool"
case "object":
case "object", "flattened":
return "map[string]interface{}"
default:
log.Fatalf("no translation for %v (field %s)", elasticsearchDataType, fieldName)
Expand Down

0 comments on commit 43885ab

Please sign in to comment.