code: func getApp(p *pkgPod.Pod) (*schema.RuntimeApp, error) {
  	_, manifest, err := p.PodManifest()
  	if err != nil {
  		return nil, errwrap.Wrap(errors.New("problem getting the pod's manifest"), err)
  	}
  
  	apps := manifest.Apps
  
  	if flagExportAppName != "" {
  		exportAppName, err := types.NewACName(flagExportAppName)
  		if err != nil {
  			return nil, err
  		}
  		for _, ra := range apps {
  			if *exportAppName == ra.Name {
  				return &ra, nil
  			}
  		}
  		return nil, fmt.Errorf("app %s is not present in pod", flagExportAppName)
  	}
  
  	switch len(apps) {
  	case 0:
  		return nil, fmt.Errorf("pod contains zero apps")
  	case 1:
  		return &apps[0], nil
  	default:
  	}
  
  	stderr.Print("pod contains multiple apps:")
  	for _, ra := range apps {
  		stderr.Printf("\t%v", ra.Name)
  	}
  
  	return nil, fmt.Errorf("specify app using \"rkt export --app= ...\"")
  }
docs: // getApp returns the app to export
  // If one was supplied in the flags then it's returned if present
  // If the PM contains a single app, that app is returned
  // If the PM has multiple apps, the names are printed and an error is returned