code: func (n *NetworkServerAPI) UpdateMulticastGroup(ctx context.Context, req *ns.UpdateMulticastGroupRequest) (*empty.Empty, error) {
  	if req.MulticastGroup == nil {
  		return nil, grpc.Errorf(codes.InvalidArgument, "multicast_group must not be nil")
  	}
  
  	var mgID uuid.UUID
  	copy(mgID[:], req.MulticastGroup.Id)
  
  	err := storage.Transaction(func(tx sqlx.Ext) error {
  		mg, err := storage.GetMulticastGroup(tx, mgID, true)
  		if err != nil {
  			return errToRPCError(err)
  		}
  
  		copy(mg.MCAddr[:], req.MulticastGroup.McAddr)
  		copy(mg.MCNwkSKey[:], req.MulticastGroup.McNwkSKey)
  		copy(mg.ServiceProfileID[:], req.MulticastGroup.ServiceProfileId)
  		copy(mg.RoutingProfileID[:], req.MulticastGroup.RoutingProfileId)
  		mg.FCnt = req.MulticastGroup.FCnt
  		mg.DR = int(req.MulticastGroup.Dr)
  		mg.Frequency = int(req.MulticastGroup.Frequency)
  		mg.PingSlotPeriod = int(req.MulticastGroup.PingSlotPeriod)
  
  		switch req.MulticastGroup.GroupType {
  		case ns.MulticastGroupType_CLASS_B:
  			mg.GroupType = storage.MulticastGroupB
  		case ns.MulticastGroupType_CLASS_C:
  			mg.GroupType = storage.MulticastGroupC
  		default:
  			return grpc.Errorf(codes.InvalidArgument, "invalid group_type")
  		}
  
  		if err := storage.UpdateMulticastGroup(tx, &mg); err != nil {
  			return errToRPCError(err)
  		}
  
  		return nil
  	})
  	if err != nil {
  		return nil, err
  	}
  
  	return &empty.Empty{}, nil
  }
docs: // UpdateMulticastGroup updates the given multicast-group.