mirror of https://github.com/vee1e/flatbuffers - FlatBuffers: Memory Efficient Serialization Library
Find a file
David Reiss 718ddea558 [Go] Make enums into real types, add String() (#5235)
* [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
2019-05-17 12:41:39 -07:00
.appveyor
.bazelci Don't test on Ubuntu 14.04 (#5302) 2019-04-24 10:28:35 -07:00
.github
.travis Unify line ending rules in '.editorconfig' and '.gitattributes' (#5231) 2019-03-18 12:47:07 -07:00
android
CMake Add RPM packaging support (#5177) 2019-02-21 20:06:04 +01:00
conan Update Conan version Automatically (#5027) 2018-11-12 08:49:42 -08:00
dart Bumped version to 1.11.0 2019-04-24 11:34:53 -07:00
docs Doc: use correct ref types for flatcc string creation. (#5305) 2019-04-24 10:34:21 -07:00
go
grpc Bumped version to 1.11.0 2019-04-24 11:34:53 -07:00
include/flatbuffers Add support for IAR compiler (#5347) 2019-05-16 11:56:22 -07:00
java/com/google/flatbuffers Java: Calculation of vtable and vtable size moved to the __init method. (#5210) 2019-02-25 23:45:29 +01:00
js [JS/TS] Size prefix support (#5326) 2019-05-16 11:43:31 -07:00
lobster
lua Lua library: fix vtable reuse. (#5214) 2019-02-25 23:27:42 +01:00
net/FlatBuffers Remove byte* property in ByteBufferAllocator (#5191) 2019-02-21 23:36:55 +01:00
php Performance improvement to generated+supporting PHP (#5080) 2018-12-20 16:10:20 -08:00
python [Python PyPI] Added classifiers and more links. Fixes typo and #5215 (#5272) 2019-05-08 12:42:20 -07:00
reflection
rust/flatbuffers Added common rust traits to FlatBufferBuilder (#5307) 2019-04-26 18:40:10 -07:00
samples Make Monster's Color unsigned (#5318) 2019-05-09 10:07:38 -07:00
snap Update snap include path instruction (#5297) 2019-04-18 15:15:21 -07:00
src [Go] Make enums into real types, add String() (#5235) 2019-05-17 12:41:39 -07:00
tests [Go] Make enums into real types, add String() (#5235) 2019-05-17 12:41:39 -07:00
.clang-format
.editorconfig Unify line ending rules in '.editorconfig' and '.gitattributes' (#5231) 2019-03-18 12:47:07 -07:00
.gitattributes Unify line ending rules in '.editorconfig' and '.gitattributes' (#5231) 2019-03-18 12:47:07 -07:00
.gitignore Add files generated by CMake to git ignore (#5278) 2019-04-05 12:35:40 -07:00
.travis.yml Attempting to make travis not kill the Android build. 2019-02-25 14:10:56 -08:00
appveyor.yml Remove byte* property in ByteBufferAllocator (#5191) 2019-02-21 23:36:55 +01:00
BUILD Set default CRTReportMode for the flatc target (#5336) 2019-05-09 10:10:10 -07:00
build_defs.bzl Fix typo in build_defs.bzl (#5320) 2019-05-06 12:10:11 -07:00
CMakeLists.txt Add detection of strtoull_l function (#5333) (#5337) 2019-05-09 10:15:29 -07:00
composer.json
conanfile.py Update Conan version Automatically (#5027) 2018-11-12 08:49:42 -08:00
CONTRIBUTING.md
LICENSE.txt
package.json Bumped version to 1.11.0 2019-04-24 11:34:53 -07:00
pom.xml [maven-release-plugin] prepare for next development iteration 2019-04-24 12:09:50 -07:00
readme.md
WORKSPACE Fix bazel build (#5174) 2019-02-14 22:05:46 +01:00

logo FlatBuffers

Join the chat at https://gitter.im/google/flatbuffers Build Status Build status

FlatBuffers is a cross platform serialization library architected for maximum memory efficiency. It allows you to directly access serialized data without parsing/unpacking it first, while still having great forwards/backwards compatibility.

Go to our landing page to browse our documentation.

Supported operating systems

  • Windows
  • MacOS X
  • Linux
  • Android
  • And any others with a recent C++ compiler.

Supported programming languages

  • C++
  • C#
  • C
  • Dart
  • Go
  • Java
  • JavaScript
  • Lobster
  • Lua
  • PHP
  • Python
  • Rust
  • TypeScript

and more in progress...

Contribution

To contribute to this project, see CONTRIBUTING.

Licensing

Flatbuffers is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.