Versions in this module Expand all Collapse all v1 v1.1.0 Aug 22, 2024 Changes in this version + const DefaultDecodeMaxStrLen + func Marshal(v interface{}) ([]byte, error) + func MustMarshal(v interface{}) []byte + func Unmarshal(data []byte, v interface{}) (err error) + type Bytes []byte + func (me *Bytes) UnmarshalBencode(b []byte) error + func (me Bytes) GoString() string + func (me Bytes) MarshalBencode() ([]byte, error) + type Decoder struct + MaxStrLen MaxStrLen + Offset int64 + func NewDecoder(r io.Reader) *Decoder + func (d *Decoder) Decode(v interface{}) (err error) + func (d *Decoder) ReadEOF() error + type Encoder struct + func NewEncoder(w io.Writer) *Encoder + func (e *Encoder) Encode(v interface{}) (err error) + type ErrUnusedTrailingBytes struct + NumUnusedBytes int + func (me ErrUnusedTrailingBytes) Error() string + type MarshalTypeError struct + Type reflect.Type + func (e *MarshalTypeError) Error() string + type Marshaler interface + MarshalBencode func() ([]byte, error) + type MarshalerError struct + Err error + Type reflect.Type + func (e *MarshalerError) Error() string + type MaxStrLen = int64 + type SyntaxError struct + Offset int64 + What error + func (e *SyntaxError) Error() string + type UnmarshalFieldError struct + Field reflect.StructField + Key string + Type reflect.Type + func (e *UnmarshalFieldError) Error() string + type UnmarshalInvalidArgError struct + Type reflect.Type + func (e *UnmarshalInvalidArgError) Error() string + type UnmarshalTypeError struct + BencodeTypeName string + UnmarshalTargetType reflect.Type + func (e *UnmarshalTypeError) Error() string + type Unmarshaler interface + UnmarshalBencode func([]byte) error + type UnmarshalerError struct + Err error + Type reflect.Type + func (e *UnmarshalerError) Error() string