INNER CODE UNIT · Go
main
pcasteran/terraform-graph-beautifier · main.go:33
func main() {
// Prepare command line options.
inputFilePath := flag.String("input", "", "Path of the input Graphviz file to read, if not set 'stdin' is used")
outputType := flag.String("output-type", outputTypeCytoscapeHTML, fmt.Sprintf("Type of output, can be one the following : %s, %s, %s", outputTypeCytoscapeJSON, outputTypeCytoscapeHTML, outputTypeGraphviz))
outputFilePath := flag.String("output", "", "Path of the output file to write, if not set 'stdout' is used")
debug := flag.Bool("debug", false, "Print debugging information to stderr")
printVersion := flag.Bool("v", false, "Print command version and exit")
// Input reading options.
var excludePatterns arrayFlags
flag.Var(&excludePatterns, "exclude", "Pattern (regexp) of the resource to filter out (can be repeated multiple times)")
keepTfJunk := flag.Bool("keep-tf-junk", false, "Do not remove the \"junk\" nodes and edges generated by 'terraform graph' (default false)")
// Output writing options.
graphName := flag.String("graph-name", getWorkingDir(), "Name of the output graph, defaults to working directory name")
embedModules := flag.Bool("embed-modules", true, "Embed a module subgraph inside its parent if true; otherwise the two modules are drawn at the same level and an edge is drawn from the parent to the child")
cytoHTMLTemplatePath := flag.String("cyto-html-template", "", fmt.Sprintf("Path of the HTML template to use for Cytoscape.js rendering (output-type=\"%s\"), if not set a default one is used", outputTypeCytoscapeHTML))
// Parse command line arguments.
flag.Parse()