code: func (s *StanServer) replicateDeleteChannel(channel string) {
  	op := &spb.RaftOperation{
  		OpType:  spb.RaftOperation_DeleteChannel,
  		Channel: channel,
  	}
  	data, err := op.Marshal()
  	if err != nil {
  		panic(err)
  	}
  	// Wait on result of replication.
  	if err = s.raft.Apply(data, 0).Error(); err != nil {
  		// If we have lost leadership, clear the deleteInProgress flag.
  		cs := s.channels
  		cs.Lock()
  		c := cs.channels[channel]
  		if c != nil && c.activity != nil {
  			c.activity.deleteInProgress = false
  		}
  		cs.Unlock()
  	}
  }
docs: // Leader invokes this to replicate the command to delete a channel.