Skip to content

Commit

Permalink
Merge pull request #6 from yourbasic/tip
Browse files Browse the repository at this point in the history
Document endianness bug.
  • Loading branch information
korthaj authored May 24, 2017
2 parents 5a59d5e + e024428 commit d175c6f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions binary.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ import (

const binVer0 = 0

// BUG(korthaj): Filters cannot be moved between little-endian
// and big-endian machines.

// Data to be included in binary representation of Filter.
type marshalFilter struct {
Version int
Expand All @@ -20,6 +23,8 @@ type marshalFilter struct {
// This method implements the encoding.BinaryMarshaler interface.
// The packages encoding/gob, encoding/json, and encoding/xml
// all check for this interface.
//
// Filters cannot be moved between little-endian and big-endian machines.
func (f *Filter) MarshalBinary() ([]byte, error) {
mf := marshalFilter{
Version: binVer0,
Expand Down

0 comments on commit d175c6f

Please sign in to comment.