INNER CODE UNIT · Go

err

pcasteran/terraform-graph-beautifier · main.go:86

		outputFile, err = os.Create(*outputFilePath)
		if err != nil {
			log.Fatal().Err(err).Msg("Cannot open the file for writing")
		}
		defer func() {
			if err := outputFile.Close(); err != nil {
				log.Fatal().Err(err).Msg("Cannot close the file after writing")
			}
		}()
	}

	switch *outputType {
	case outputTypeCytoscapeJSON:
		log.Debug().Msg("Output graph data to Cytoscape.js JSON format")
		cytoscape.WriteGraphJSON(outputFile, graph, &cytoscape.RenderingOptions{
			GraphName:    *graphName,
			EmbedModules: *embedModules,
		})

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…