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