code: func generatorFromName(
  	generatorName string,
  	imageNames []string,
  	deploymentName string,
  ) (generate.StructuredGenerator, bool) {
  
  	switch generatorName {
  	case generateversioned.DeploymentBasicAppsV1GeneratorName:
  		generator := &generateversioned.DeploymentBasicAppsGeneratorV1{
  			BaseDeploymentGenerator: generateversioned.BaseDeploymentGenerator{
  				Name:   deploymentName,
  				Images: imageNames,
  			},
  		}
  		return generator, true
  
  	case generateversioned.DeploymentBasicAppsV1Beta1GeneratorName:
  		generator := &generateversioned.DeploymentBasicAppsGeneratorV1Beta1{
  			BaseDeploymentGenerator: generateversioned.BaseDeploymentGenerator{
  				Name:   deploymentName,
  				Images: imageNames,
  			},
  		}
  		return generator, true
  
  	case generateversioned.DeploymentBasicV1Beta1GeneratorName:
  		generator := &generateversioned.DeploymentBasicGeneratorV1{
  			BaseDeploymentGenerator: generateversioned.BaseDeploymentGenerator{
  				Name:   deploymentName,
  				Images: imageNames,
  			},
  		}
  		return generator, true
  	}
  
  	return nil, false
  }
docs: // generatorFromName returns the appropriate StructuredGenerator based on the
  // generatorName. If the generatorName is unrecognized, then return (nil,
  // false).