// NewByteSliceFromBase64 constructs and returns a new ByteSlice object based on
// the given base64 encoded []byte b.
NewByteSliceFromBase64 constructs and returns a new ByteSlice object based on
the given base64 encoded []byte b.
// NewByteSliceFromBase64 constructs and returns a new ByteSlice object based on // the given base64 encoded [] byte b .
func NewByteSliceFromBase64(b []byte) (ByteSlice, error) {
	if b == nil {
		return NullByteSlice(), nil
	}
	tmp := make([]byte, base64.StdEncoding.DecodedLen(len(b)))
	n, err := base64.StdEncoding.Decode(tmp, b)
	if err != nil {
		return ByteSlice{}, err
	}
	return ByteSlice{
		ByteSlice: tmp[:n],
		Valid:     true,
	}, nil
}
func NewByteSliceFromBase64 ( b [ ] byte ) ( ByteSlice , error ) { if b == nil { return NullByteSlice ( ) , nil } tmp := make ( [ ] byte , base64 . StdEncoding . DecodedLen ( len ( b ) ) ) n , err := base64 . StdEncoding . Decode ( tmp , b ) if err != nil { return ByteSlice { } , err } return ByteSlice { ByteSlice : tmp [ : n ] , Valid : true , } , nil }
NewByteSliceFromBase64 constructs and returns a new ByteSlice object based on
the given base64 encoded []byte b.
NewByteSliceFromBase64 constructs and returns a new ByteSlice object based on the given base64 encoded [] byte b .