func (d decoder) unmarshalSingular(m pref.Message, fd pref.FieldDescriptor) error {
	var val pref.Value
	var err error
	switch fd.Kind() {
	case pref.MessageKind, pref.GroupKind:
		val = m.NewField(fd)
		err = d.unmarshalMessage(val.Message(), false)
	default:
		val, err = d.unmarshalScalar(fd)
	}

	if err != nil {
		return err
	}
	m.Set(fd, val)
	return nil
}
// unmarshalSingular unmarshals to the non-repeated field specified
// by the given FieldDescriptor.
unmarshalSingular unmarshals to the non-repeated field specified
by the given FieldDescriptor.
// unmarshalSingular unmarshals to the non - repeated field specified // by the given FieldDescriptor .
func (d decoder) unmarshalSingular(m pref.Message, fd pref.FieldDescriptor) error {
	var val pref.Value
	var err error
	switch fd.Kind() {
	case pref.MessageKind, pref.GroupKind:
		val = m.NewField(fd)
		err = d.unmarshalMessage(val.Message(), false)
	default:
		val, err = d.unmarshalScalar(fd)
	}
	if err != nil {
		return err
	}
	m.Set(fd, val)
	return nil
}
func ( d decoder ) unmarshalSingular ( m pref . Message , fd pref . FieldDescriptor ) error { var val pref . Value var err error switch fd . Kind ( ) { case pref . MessageKind , pref . GroupKind : val = m . NewField ( fd ) err = d . unmarshalMessage ( val . Message ( ) , false ) default : val , err = d . unmarshalScalar ( fd ) } if err != nil { return err } m . Set ( fd , val ) return nil }
unmarshalSingular unmarshals to the non-repeated field specified
by the given FieldDescriptor.
unmarshalSingular unmarshals to the non - repeated field specified by the given FieldDescriptor .