From 334b408e15708ea6c9987e5bd95356cbdbbe52e8 Mon Sep 17 00:00:00 2001 From: Eric Beahan Date: Mon, 22 Mar 2021 12:42:00 -0500 Subject: [PATCH] Add flattened type support to Go code generator (#1302) --- CHANGELOG.next.md | 2 ++ scripts/cmd/gocodegen/gocodegen.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.next.md b/CHANGELOG.next.md index cb6b11e399..094ad9287e 100644 --- a/CHANGELOG.next.md +++ b/CHANGELOG.next.md @@ -32,6 +32,8 @@ Thanks, you're awesome :-) --> #### Improvements +* Go code generator now supports the `flattened` data type. #1302 + #### Deprecated diff --git a/scripts/cmd/gocodegen/gocodegen.go b/scripts/cmd/gocodegen/gocodegen.go index 4ec88739f9..9044f0bf35 100644 --- a/scripts/cmd/gocodegen/gocodegen.go +++ b/scripts/cmd/gocodegen/gocodegen.go @@ -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)