code: func (s *BufferedSender) Close() error {
  	// since we are running, write lock during cleanup
  	s.runmx.Lock()
  	defer s.runmx.Unlock()
  	if !s.running {
  		return nil
  	}
  
  	errChan := make(chan error)
  	s.running = false
  	s.shutdown <- errChan
  	return <-errChan
  }
docs: // Close Buffered Sender