Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:gogo/protobuf into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
awalterschulze committed May 9, 2018
2 parents 20cbbb0 + 110e410 commit 0f5937a
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 4 deletions.
8 changes: 4 additions & 4 deletions extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ You might also find that basic structs that started their life as part of an API
<tr><td><a href="https://github.com/gogo/protobuf/blob/master/test/types/types.proto">stdduration</a></td><td> Duration Field </td><td> bool </td><td>Changes the Well Known Duration Type to time.Duration</td><td>Duration</td></tr>
</table>

`Warning about nullable: according to the Protocol Buffer specification, you should be able to tell whether a field is set or unset. With the option nullable=false this feature is lost, since your non-nullable fields will always be set.`
`Warning about nullable: according to the Protocol Buffer specification, you should be able to tell whether a field is set or unset. With the option nullable=false this feature is lost, since your non-nullable fields will always be set.`

# Goprotobuf Compatibility
# Goprotobuf Compatibility

Gogoprotobuf is compatible with Goprotobuf, because it is compatible with protocol buffers (see the section on tests below).

Expand Down Expand Up @@ -118,7 +118,7 @@ Other serialization formats like xml and json typically use reflect to marshal a

<a href="https://groups.google.com/forum/#!topic/gogoprotobuf/xmFnqAS6MIc">Here is a longer explanation of jsontag and moretags</a>

# File Options
# File Options

Each of the boolean message and enum extensions also have a file extension:

Expand Down Expand Up @@ -155,7 +155,7 @@ Each of these are the same as their Message Option counterparts, except they app

# Tests

* The normal barrage of tests are run with: `make tests`
* The normal barrage of tests are run with: `make tests`
* A few weird tests: `make testall`
* Tests for compatibility with [golang/protobuf](https://github.com/golang/protobuf) are handled by a different project [harmonytests](https://github.com/gogo/harmonytests), since it requires goprotobuf.
* Cross version tests are made with [Travis CI](https://travis-ci.org/gogo/protobuf).
Expand Down
4 changes: 4 additions & 0 deletions test/combos/both/uuid.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ func PutLittleEndianUint64(b []byte, offset int, v uint64) {

type Uuid []byte

func (uuid Uuid) Bytes() []byte {
return uuid
}

func (uuid Uuid) Marshal() ([]byte, error) {
if len(uuid) == 0 {
return nil, nil
Expand Down
4 changes: 4 additions & 0 deletions test/combos/marshaler/uuid.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ func PutLittleEndianUint64(b []byte, offset int, v uint64) {

type Uuid []byte

func (uuid Uuid) Bytes() []byte {
return uuid
}

func (uuid Uuid) Marshal() ([]byte, error) {
if len(uuid) == 0 {
return nil, nil
Expand Down
4 changes: 4 additions & 0 deletions test/combos/unmarshaler/uuid.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ func PutLittleEndianUint64(b []byte, offset int, v uint64) {

type Uuid []byte

func (uuid Uuid) Bytes() []byte {
return uuid
}

func (uuid Uuid) Marshal() ([]byte, error) {
if len(uuid) == 0 {
return nil, nil
Expand Down
4 changes: 4 additions & 0 deletions test/uuid.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ func PutLittleEndianUint64(b []byte, offset int, v uint64) {

type Uuid []byte

func (uuid Uuid) Bytes() []byte {
return uuid
}

func (uuid Uuid) Marshal() ([]byte, error) {
if len(uuid) == 0 {
return nil, nil
Expand Down

0 comments on commit 0f5937a

Please sign in to comment.