Commit Graph

14 Commits

Author SHA1 Message Date
Tim Hockin
b01ac4726f go2idl: Consistently handle comments as []string
This makes subsequent comment-tag PRs more consistent.
2016-07-07 16:49:46 -07:00
David McMahon
ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Clayton Coleman
5f9e7a00b8
Add optional slice and map support to protobuf
Specifying // +protobuf.nullable=true on a Go type that is an alias of a
map or slice will generate a synthetic protobuf message with the type
name that will serialize to the wire in a way that allows the difference
between empty and nil to be recorded.

For instance:

    // +protobuf.nullable=true
    types OptionalMap map[string]string

will create the following message:

    message OptionalMap {
      map<string, string> Items = 1
    }

and generate marshallers that use the presence of OptionalMap to
determine whether the map is nil (rather than Items, which protobuf
provides no way to delineate between empty and nil).
2016-06-27 21:42:02 -07:00
Tim Hockin
92567e1b06 Make go2idl handle vendor dirs 2016-05-08 20:30:38 -07:00
goltermann
a3104ba96c Final vet fixes; enabling vet checks in verify scripts. 2016-04-13 13:51:51 -07:00
goltermann
696423e044 Vet fixes, mostly pass lock by value errors. 2016-04-06 11:27:40 -07:00
Wojciech Tyczynski
525d14e0bc Fix gofmt errors 2016-03-08 09:46:47 +01:00
Chao Xu
5f0509a351 add SecondClosestCommentLines to go2idl types.Type 2015-12-15 22:30:58 -08:00
Chao Xu
0a09bbbf57 add OrderTypes() to Orderer 2015-12-15 10:07:59 -08:00
Chao Xu
0d7d4c04a2 split Package.Types to Types, Variables and Functions;
add DeclarationOf Kind.
2015-12-03 12:03:47 -08:00
Clayton Coleman
72df8bbfbe Allow go2idl to generate non-Go file types
Remove some indentation from file generation for specific languages,
allow SnippetWriter's io.Writer to be accessed, and add Path to
types.Name for languages where Package and Path can be disjoint.
2015-11-28 17:39:26 -05:00
Chao Xu
75cf28b7df Track Func in Universe 2015-11-24 21:22:30 -08:00
Wojciech Tyczynski
f991586db2 Support current package in RawNamer. 2015-11-09 13:31:18 +01:00
Daniel Smith
5ac9b16ade First iteration of go2idl.
* Add support for pointers, map keys, more builtins, Alias types
* Support for packages & imports
* Add helper functions to types
* change generation interface
* fix naming/ordering
* SnippetWriter for templates
* Naming systems
* Use the standard packages for import resolution
* Documentation
2015-10-21 09:56:36 -07:00