Open
Description
If the generated code would include the methods MarshalBinary
and UnmarshalBinary
from Go's stdlib, the corresponding interfaces from the encoding
package would be satisfied. Storage/Transmitting-Code could be unified and a dependency to the protobuf package could be removed. The methods would look like:
func (m *Model) MarshalBinary() ([]byte, error) {
return proto.Marshal(m)
}
func (m *Model) UnmarshalBinary(data []byte) error {
return proto.Unmarshal(data, m)
}