code: func (g *WriterGroup) Write(p []byte) (int, error) {
  	g.mu.Lock()
  	defer g.mu.Unlock()
  	for k, w := range g.writers {
  		n, err := w.Write(p)
  		if err == nil && len(p) == n {
  			continue
  		}
  		// The writer is closed or in bad state, remove it.
  		w.Close()
  		delete(g.writers, k)
  	}
  	if len(g.writers) == 0 {
  		return 0, errors.New("writer group is empty")
  	}
  	return len(p), nil
  }
docs: // Write writes data into each writer. If a writer returns error,
  // it will be closed and removed from the writer group. It returns
  // error if writer group is empty.