()
| 24 | ) |
| 25 | |
| 26 | func main() { |
| 27 | if len(os.Args) > 2 { |
| 28 | fmt.Fprintf(os.Stderr, "usage: %s [output directory]\n", os.Args[0]) |
| 29 | os.Exit(1) |
| 30 | } |
| 31 | |
| 32 | path := "docs/cmd" |
| 33 | if len(os.Args) == 2 { |
| 34 | path = os.Args[1] |
| 35 | } |
| 36 | |
| 37 | outDir, err := filepath.Abs(path) |
| 38 | if err != nil { |
| 39 | fmt.Fprintf(os.Stderr, "failed to get output directory: %v\n", err) |
| 40 | os.Exit(1) |
| 41 | } |
| 42 | |
| 43 | // Set environment variables used so the output is consistent, |
| 44 | // regardless of where we run. |
| 45 | os.Setenv("TMPDIR", "/tmp") |
| 46 | |
| 47 | cloudSQLProxy := cmd.NewCommand() |
| 48 | cloudSQLProxy.Execute() |
| 49 | cloudSQLProxy.DisableAutoGenTag = true |
| 50 | doc.GenMarkdownTree(cloudSQLProxy.Command, outDir) |
| 51 | } |
nothing calls this directly
no test coverage detected