// MarshalMapValue implements the pyrrho/encoding/maps Marshaler interface. It
// will encode b into its base64 encoded interface{} representation for use in a
// map[string]interface{} if valid, or return nil otherwise.
MarshalMapValue implements the pyrrho/encoding/maps Marshaler interface. It
will encode b into its base64 encoded interface{} representation for use in a
map[string]interface{} if valid, or return nil otherwise.
// MarshalMapValue implements the pyrrho / encoding / maps Marshaler interface . It // will encode b into its base64 encoded interface {} representation for use in a // map [ string ] interface {} if valid or return nil otherwise .
func (b ByteSlice) MarshalMapValue() (interface{}, error) {
	if !b.Valid {
		return nil, nil
	}
	enc := make([]byte, base64.StdEncoding.EncodedLen(len(b.ByteSlice)))
	base64.StdEncoding.Encode(enc, b.ByteSlice)
	return enc, nil
}
func ( b ByteSlice ) MarshalMapValue ( ) ( interface { } , error ) { if ! b . Valid { return nil , nil } enc := make ( [ ] byte , base64 . StdEncoding . EncodedLen ( len ( b . ByteSlice ) ) ) base64 . StdEncoding . Encode ( enc , b . ByteSlice ) return enc , nil }
MarshalMapValue implements the pyrrho/encoding/maps Marshaler interface.
MarshalMapValue implements the pyrrho / encoding / maps Marshaler interface .
// TODO: For all base64.StdEncoding.Encode calls, consider performing an // optimization similar to the one implemented in encoding/json/encode.go's // encodeByteSlice function.