summaryrefslogtreecommitdiff
path: root/go
AgeCommit message (Collapse)AuthorFilesLines
2017-08-24Trimmed vtables of trailing zeroes.Wouter van Oortmerssen1-0/+5
This is something the format supports, but none of the builders were doing. Can save 10-20% on FlatBuffer binary size! Also fixed the Go tests. Change-Id: I616c56ce9bbcfcaee23aa24f0532fcb60b6a8c75 Tested: on Linux.
2017-01-23Reword comment so that code editors can mark deprecation correctly (#4147)Florin Pățan1-1/+1
2017-01-09Resolve Go fmt and vet warnings (#4134)Pascal S. de Kloe1-1/+1
* Resolve Go fmt and vet warnings. * Undo generated code gofmt.
2016-12-21Go related style fixes.wvo1-2/+2
Change-Id: Ie854ace69a21ef685e1ade5584f9d9ce4e8b41f1
2016-12-08Restore the ''import "unsafe'' removed in ↵Manolama1-0/+4
36daedf35fd0cc2ad0e5e24d187b25613c13660e. This was causing build failures with tools dependent on Flatbuffers in Go. E.g. go/src/github.com/google/flatbuffers/go/sizes.go:50: undefined: unsafe in unsafe.Pointer
2016-12-07Merge pull request #3791 from mmastrac/masterRobert1-19/+20
Avoid unsafe when sizing types
2016-12-07Merge pull request #3977 from gonzaloserrano/feature/go-generic-deserialitzationRobert1-0/+13
Add a generic way to deserialize a flatbuffer in Go.
2016-12-05Support for Golang GRPC (Experimental) (#4082)Ronak Jain1-0/+23
* support for grpc golang * refactored grpc go generator * added grpc-go test and refactored * refactored idl_gen_grpc.cpp * fixed grpc generate method name * refactored flatc and fixed line length issue * added codec to go lib and fixed formatting issues * fixed spacing issues
2016-08-23Add a generic way to deserialize a flatbuffer in Go.gonzaloserrano1-0/+13
Similar to what protobufs does with its `Message` interface, introduce here such interface and create a generic `GetRootAs` method to deserialize a flatbuffer.
2016-07-20Implement mutators for GoMuhammed Thanish1-0/+210
2016-07-18Avoid unsafe when sizing typesMatt Mastracci1-19/+20
2016-04-23Fix heap allocation when reading a string.rw2-1/+7
2015-11-11Improve Builder user interface.rw1-29/+73
+ Add state to the Builder object to track if we are inside a table, and if we are finished building the buffer. + Use this data to check that a buffer is being built correctly. + Panic if a buffer is not being built correctly. + Test that the panics happen as expected. Based on d236dea13d2fdb9ad596679868eb4204c1562151.
2015-06-24Panic when nesting strings. Test panic scenarios.rw1-8/+17
Also add a new `insideObject` boolean to the Builder to track whether an object is currently being constructed. This fixes a bug with objects that have zero fields.
2015-05-20Go: CreateString now needs zero allocs.rw1-1/+9
Big speed boost for the typical use case of building with strings.
2015-05-12Merge pull request #165 from rw/go-fasterRobert1-13/+51
Go speed improvements
2015-05-09invoke many fewer growth eventsrw1-7/+4
2015-05-09gofmtrw1-2/+2
2015-05-09remove remaining allocs during buildrw1-6/+24
2015-04-06Add byte slice accessor to Go codeBen Harper1-1/+6
Change-Id: I15cc8924d6607bd93068c762fd67e6088cfd9789
2015-04-06Always add additional space if no more is availableKyle Jones1-1/+1
Change-Id: If08b2d839489d40e977de794b13584fa66ff32c1
2015-04-02Reduce allocations when reusing a Builder.rw1-6/+25
Add the function `Reset` to the Builder, which facilitates reuse of the underlying byte slice.
2015-04-02Reduce allocations when building strings.rw1-4/+8
Builder has a new CreateByteString function that writes a null-terimnated byte slice to the buffer. This results in zero allocations for writing strings.
2015-04-01Add byte slice accessor to Go codeBen Harper1-1/+6
2015-03-11Add CreateByteVector function to Go's builderBen Harper1-0/+12
This function gets around the inefficiency of populating a [ubyte] vector byte by byte. Since ubyte vectors are probably the most commonly used type of generic byte buffer, this seems like a worthwhile thing to create a fast path for. Benchmarks show a 6x improvement in throughput on x64. There is a new test verifying the functionality of the function. Change-Id: I82e0228ae0f815dd7ea89bf168b8c1925f3ce0d7
2014-10-29Fix a build error on 32 bit goLuna1-1/+1
Change-Id: Iac5894fd8f56da7e420714558a94d63d4fea2d72
2014-09-23Fix vector of strings for Gorw1-1/+0
Mirrors Java patch 39d4b7e2bf Change-Id: If8d0ab29f6eb508a156d468aeb0a9d5410149e53
2014-09-04Fixed possible alignment issue in Gorw1-1/+2
Java patch with same purpose: cdb0dca39d683d577caa7fde21a1b6db9aa64734 Change-Id: I57d268cc0064843779eb7812a9e69326d9ab2498 Tested: on Darwin
2014-07-21Port FlatBuffers to Go.rw6-0/+1197
Implement code generation and runtime library for Go, derived from the Java implementation. Additionally, the test suite verifies: - the exact bytes in the Builder buffer during object construction, - vtable deduplication, and - table construction, via a fuzzer derived from the C++ implementation. Change-Id: Ib95a019c684891def2b50281e570b4843fea7baa