code: func tryWaitForSystemdActiveState(units []string, maxAttempts int) (err error) {
  	if maxAttempts <= -1 {
  		for _, name := range units {
  			stdout("Triggered unit %s start", name)
  		}
  		return nil
  	}
  
  	errchan := waitForSystemdActiveState(units, maxAttempts)
  	for err := range errchan {
  		stderr("Error waiting for units: %v", err)
  		return err
  	}
  
  	return nil
  }
docs: // tryWaitForSystemdActiveState tries to wait for systemd units to reach an
  // active state, making use of cAPI. It takes one or more units as input, and
  // ensures that every unit in the []units must be in the active state.
  // If yes, return nil. Otherwise return error.