a41f938cec
As we have seen, dependencies version can prevent the build. We should user lock versions on dependencies that we know work: * Packages are vendored * Add Godep support * Added addtional install step in readme * Fix travis build error
18 lignes
291 o
Go
18 lignes
291 o
Go
package bencode
|
|
|
|
type Bytes []byte
|
|
|
|
var (
|
|
_ Unmarshaler = &Bytes{}
|
|
_ Marshaler = &Bytes{}
|
|
_ Marshaler = Bytes{}
|
|
)
|
|
|
|
func (me *Bytes) UnmarshalBencode(b []byte) error {
|
|
*me = append([]byte(nil), b...)
|
|
return nil
|
|
}
|
|
|
|
func (me Bytes) MarshalBencode() ([]byte, error) {
|
|
return me, nil
|
|
}
|