func SetRawExtension(base extendableProto, id int32, b []byte) {
	if ebase, ok := base.(extensionsMap); ok {
		ebase.ExtensionMap()[id] = Extension{enc: b}
	} else if ebase, ok := base.(extensionsBytes); ok {
		clearExtension(base, id)
		ext := ebase.GetExtensions()
		*ext = append(*ext, b...)
	} else {
		panic("unreachable")
	}
}
SetRawExtension is for testing only.
package proto
import (
	"errors"
	"fmt"
	"reflect"
	"strconv"
	"sync"
)
var ErrMissingExtension = errors.New("proto: missing extension")
type ExtensionRange struct {
	Start, End int32  
}
type extendableProto interface {
	Message
	ExtensionRangeArray() []ExtensionRange
}
type extensionsMap interface {
	extendableProto
	ExtensionMap() map[int32]Extension
}
type extensionsBytes interface {
	extendableProto
	GetExtensions() *[]byte
}
var extendableProtoType = reflect.TypeOf((*extendableProto)(nil)).Elem()
type ExtensionDesc struct {
	ExtendedType  Message      
	ExtensionType interface{}  
	Field         int32        
	Name          string       
	Tag           string       
}
func (ed *ExtensionDesc) repeated() bool {
	t := reflect.TypeOf(ed.ExtensionType)
	return t.Kind() == reflect.Slice && t.Elem().Kind() != reflect.Uint8
}
type Extension struct {
	desc  *ExtensionDesc
	value interface{}
	enc   []byte
}