func (emt errorMarshalType) MarshalBencode() ([]byte, error) {
	return nil, errors.New("oops")
}
MarshalBencode implements Marshaler.MarshalBencode
package bencode
import (
	"errors"
	"time"
)
type myBoolType bool
func (mbt myBoolType) MarshalBencode() ([]byte, error) {
	var c string
	if mbt {
		c = "y"
	} else {
		c = "n"
	}
	return EncodeBytes(c)
}
func (mbt *myBoolType) UnmarshalBencode(b []byte) error {
	var str string
	err := DecodeBytes(b, &str)
	if err != nil {
		return err
	}
	switch str {
	case "y":
		*mbt = true
	case "n":
		*mbt = false
	default:
		err = errors.New("invalid myBoolType")
	}
	return err
}
type myBoolTextType bool
func (mbt myBoolTextType) MarshalText() ([]byte, error) {
	if mbt {
		return []byte("y"), nil
	}
	return []byte("n"), nil
}
func (mbt *myBoolTextType) UnmarshalText(b []byte) error {
	switch string(b) {
	case "y":
		*mbt = true
	case "n":
		*mbt = false
	default:
		return errors.New("invalid myBoolType")
	}
	return nil
}
type myTimeType struct {
	time.Time
}
func (mtt myTimeType) MarshalBencode() ([]byte, error) {
	return EncodeBytes(mtt.Time.Unix())
}
func (mtt *myTimeType) UnmarshalBencode(b []byte) error {
	var epoch int64
	err := DecodeBytes(b, &epoch)
	if err != nil {
		return err
	}
	mtt.Time = time.Unix(epoch, 0)
	return nil
}
type errorMarshalType struct{}