dedis / protobuf

Reflection-based Protocol Buffers for Go
GNU General Public License v2.0
76 stars 15 forks source link

Optional bytes #44

Closed aounleonardo closed 6 years ago

aounleonardo commented 6 years ago

[]byte was considered a special case in value(). I removed the case to allow byte slices to go through the slice() method like any other slice. This allows a nil []byte to be considered an empty slice as it used to happen with []int or other slices.

Closes #4

ineiti commented 6 years ago

It looks like this has the changes of #43 in it, too. Please make each PR only having the changes necessary.

aounleonardo commented 6 years ago

Ok changes done, sorry about the similarity with #43, I might have started solving both on the same branch. Will keep that in mind for next time.