code: func RunRemove(dockerCli command.Cli, opts options.Remove) error {
  	client := dockerCli.Client()
  	ctx := context.Background()
  
  	var errs []string
  	for _, namespace := range opts.Namespaces {
  		services, err := getStackServices(ctx, client, namespace)
  		if err != nil {
  			return err
  		}
  
  		networks, err := getStackNetworks(ctx, client, namespace)
  		if err != nil {
  			return err
  		}
  
  		var secrets []swarm.Secret
  		if versions.GreaterThanOrEqualTo(client.ClientVersion(), "1.25") {
  			secrets, err = getStackSecrets(ctx, client, namespace)
  			if err != nil {
  				return err
  			}
  		}
  
  		var configs []swarm.Config
  		if versions.GreaterThanOrEqualTo(client.ClientVersion(), "1.30") {
  			configs, err = getStackConfigs(ctx, client, namespace)
  			if err != nil {
  				return err
  			}
  		}
  
  		if len(services)+len(networks)+len(secrets)+len(configs) == 0 {
  			fmt.Fprintf(dockerCli.Err(), "Nothing found in stack: %s\n", namespace)
  			continue
  		}
  
  		hasError := removeServices(ctx, dockerCli, services)
  		hasError = removeSecrets(ctx, dockerCli, secrets) || hasError
  		hasError = removeConfigs(ctx, dockerCli, configs) || hasError
  		hasError = removeNetworks(ctx, dockerCli, networks) || hasError
  
  		if hasError {
  			errs = append(errs, fmt.Sprintf("Failed to remove some resources from stack: %s", namespace))
  		}
  	}
  
  	if len(errs) > 0 {
  		return errors.Errorf(strings.Join(errs, "\n"))
  	}
  	return nil
  }
docs: // RunRemove is the swarm implementation of docker stack remove