fishy commented on code in PR #3778:
URL: https://github.com/apache/thrift/pull/3778#discussion_r3909596997
##########
compiler/cpp/src/thrift/generate/t_go_generator.cc:
##########
@@ -4484,16 +4567,35 @@ string t_go_generator::type_to_enum(t_type* type) {
throw "INVALID TYPE IN type_to_enum: " + type->get_name();
}
+/**
+ * Returns true when the map cannot be a Go map because its key type is a
+ * container (list, set or map, possibly behind a typedef). Such maps are
+ * represented as a slice of thrift.MapEntry.
+ */
+bool t_go_generator::is_map_entry_slice(t_type* type) {
Review Comment:
the name is misleading, we return true not only for slices, but also for
maps and sets. call it `is_map_entry_container` or something like that instead?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]