code: func (n *Notifier) Notify(id ID, data interface{}) error {
  	enc, err := json.Marshal(data)
  	if err != nil {
  		return err
  	}
  
  	n.mu.Lock()
  	defer n.mu.Unlock()
  
  	if n.sub == nil {
  		panic("can't Notify before subscription is created")
  	} else if n.sub.ID != id {
  		panic("Notify with wrong ID")
  	}
  	if n.activated {
  		return n.send(n.sub, enc)
  	}
  	n.buffer = append(n.buffer, enc)
  	return nil
  }
docs: // Notify sends a notification to the client with the given data as payload.
  // If an error occurs the RPC connection is closed and the error is returned.