INNER CODE UNIT · Go
getWorkingDir
pcasteran/terraform-graph-beautifier · main.go:25
func getWorkingDir() string {
dir, err := os.Getwd()
if err != nil {
panic(err)
}
return filepath.Base(dir)
}
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)")