code: func waitForSystemdActiveState(units []string, maxAttempts int) (errch chan error) {
  	errchan := make(chan error)
  	var wg sync.WaitGroup
  	for _, name := range units {
  		wg.Add(1)
  		go checkSystemdActiveState(name, maxAttempts, &wg, errchan)
  	}
  
  	go func() {
  		wg.Wait()
  		close(errchan)
  	}()
  
  	return errchan
  }
docs: // waitForSystemdActiveState tries to assert that the given unit becomes
  // active, making use of multiple goroutines that check unit states.