code: func (p *Processor) Unmarshal(data []byte) (interface{}, error) {
  	if len(data) < 2 {
  		return nil, errors.New("protobuf data too short")
  	}
  
  	// id
  	var id uint16
  	if p.littleEndian {
  		id = binary.LittleEndian.Uint16(data)
  	} else {
  		id = binary.BigEndian.Uint16(data)
  	}
  	if id >= uint16(len(p.msgInfo)) {
  		return nil, fmt.Errorf("message id %v not registered", id)
  	}
  
  	// msg
  	i := p.msgInfo[id]
  	if i.msgRawHandler != nil {
  		return MsgRaw{id, data[2:]}, nil
  	} else {
  		msg := reflect.New(i.msgType.Elem()).Interface()
  		return msg, proto.UnmarshalMerge(data[2:], msg.(proto.Message))
  	}
  }
docs: // goroutine safe