mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-19 19:55:43 +00:00
[Go] Generate imports with fixed order (#5340)
* use fixed order for golang imports * grumble
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
bff7ffbc51
commit
b56d60f058
@@ -113,7 +113,13 @@ class GoGenerator : public BaseGenerator {
|
||||
private:
|
||||
Namespace go_namespace_;
|
||||
Namespace *cur_name_space_;
|
||||
std::set<const Namespace*> tracked_imported_namespaces_;
|
||||
|
||||
struct NamespacePtrLess {
|
||||
bool operator()(const Namespace *a, const Namespace *b) const {
|
||||
return *a < *b;
|
||||
}
|
||||
};
|
||||
std::set<const Namespace *, NamespacePtrLess> tracked_imported_namespaces_;
|
||||
|
||||
// Most field accessors need to retrieve and test the field offset first,
|
||||
// this is the prefix code for that.
|
||||
|
||||
Reference in New Issue
Block a user