flatbuffers
flatbuffers copied to clipboard
Go generator undefined behavior
In cases that fbs file not defined namespace Go generator has undefined behavior, It generate file with blank package. plus not import files properly because their package name is empty. For instance:
foo.fbs:
include "header.fbs";
namespace myspace;
table Food1 {
haye_1: JAFAF;
}
header.fbs
table JAFAF {
dodol: int;
}
It will generate correspondent files :
Food1.go
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
package myspace
import (
flatbuffers "github.com/google/flatbuffers/go"
""
)
type Food1 struct {
_tab flatbuffers.Table
} ...
JAFAF.go
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
package
import (
flatbuffers "github.com/google/flatbuffers/go"
)
type JAFAF struct {
_tab flatbuffers.Table
}