// Generate returns a DOT graph based on the dependencies
// from the kustomization.yaml file located in the current working directory
Generate returns a DOT graph based on the dependencies
from the kustomization.yaml file located in the current working directory
// Generate returns a DOT graph based on the dependencies // from the kustomization . yaml file located in the current working directory
func (g *kustomizationGraph) Generate() (string, error) {
	workingDirectory, err := os.Getwd()
	if err != nil {
		return "", errors.Wrapf(err, "Unable to get current working directory")
	}
	kustomizationFileContext := kustomizationfile.New()
	err = g.buildGraph(kustomizationFileContext, workingDirectory, "")
	if err != nil {
		return "", errors.Wrapf(err, "Could not produce graph from directory %s", workingDirectory)
	}
	return g.String(), nil
}
func ( g * kustomizationGraph ) Generate ( ) ( string , error ) { workingDirectory , err := os . Getwd ( ) if err != nil { return " " , errors . Wrapf ( err , " " ) } kustomizationFileContext := kustomizationfile . New ( ) err = g . buildGraph ( kustomizationFileContext , workingDirectory , " " ) if err != nil { return " " , errors . Wrapf ( err , " " , workingDirectory ) } return g . String ( ) , nil }
Generate returns a DOT graph based on the dependencies
from the kustomization.yaml file located in the current working directory
Generate returns a DOT graph based on the dependencies from the kustomization . yaml file located in the current working directory