* Add support for key lookup for tables in Go
* Run clang format
* Run go fmt on tests
* Remove TODO in tests
* Update LookupByKey API
* Update LookupByKey API
* Don't use resolvePointer in expectEq
* Use generated getters instead of reading values directly from buffer
* Fix typo
Co-authored-by: Derek Bailey <derekbailey@google.com>
* go: replace objAPI-generated Pack func with method
See discussion at https://github.com/google/flatbuffers/issues/5668
* go: replace generated union type UnPack func with method
Similar to discussion https://github.com/google/flatbuffers/issues/5668
But signature:
```
func AnyUnPack(t Any, table flatbuffers.Table) *AnyT
```
Becomes,
```
func (rcv Any) UnPack(table flatbuffers.Table) *AnyT
```
* [Go] Make enums into real types, add String()
This changes the generated code for enums: instead of type aliases,
they're now distinct types, allowing for better type-checking. Some
client code may have to be changed to add casts.
Enum types now have a String() method, so they implement fmt.Stringer.
An EnumValues map is now generated, in addition to the existing
EnumNames map, to easily map strings to values.
Generated enum files are now gofmt-clean.
Fixes#5207
* use example.ColorGreen explicitly
* use valid enum value in mutation test, add new test for "invalid" enum
* add length check and comment
Some generic C++ and Rust code is not generated when unions use type
aliases because of potential ambiguity. Actually check for this
ambiguity and only disable offending code only if it is found.