code: func main() {
  	flag.Parse()
  
  	stage1initcommon.InitDebug(debug)
  
  	log, diag, _ = rktlog.NewLogSet("app-rm", debug)
  	if !debug {
  		diag.SetOutput(ioutil.Discard)
  	}
  
  	appName, err := types.NewACName(flagApp)
  	if err != nil {
  		log.FatalE("invalid app name", err)
  	}
  
  	enterCmd := stage1common.PrepareEnterCmd(false)
  	switch flagStage {
  	case 0:
  		// clean resources in stage0
  		err = cleanupStage0(appName, enterCmd)
  	case 1:
  		// clean resources in stage1
  		err = cleanupStage1(appName, enterCmd)
  	default:
  		// unknown step
  		err = fmt.Errorf("unsupported cleaning step %d", flagStage)
  	}
  	if err != nil {
  		log.FatalE("cleanup error", err)
  	}
  
  	os.Exit(0)
  }
docs: // This is a multi-step entrypoint. It starts in stage0 context then invokes
  // itself again in stage1 context to perform further cleanup at pod level.