Skip to content

Commit

Permalink
Address PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rhatgadkar-goog committed Dec 4, 2024
1 parent a1038c5 commit 78cc4dd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ jobs:
run: |
go install ./cmd/gendocs
gendocs
git diff --exit-code
git diff --exit-code
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,8 @@ debug = true
debug-logs = true
```

Run `./alloydb-auth-proxy --help` for more details.
Run `./alloydb-auth-proxy --help` for more details. See the full documentation
in [docs/cmd](docs/cmd).


## Running behind a Socks5 proxy
Expand Down
14 changes: 8 additions & 6 deletions cmd/gendocs/gen_alloydb-proxy_docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@ import (
)

func main() {
if len(os.Args) > 2 {
fmt.Fprintf(os.Stderr, "usage: %s [output directory]\n", os.Args[0])
os.Exit(1)
}

path := "docs/cmd"
if len(os.Args) == 2 {
path = os.Args[1]
} else if len(os.Args) > 2 {
fmt.Fprintf(os.Stderr, "usage: %s [output directory]\n", os.Args[0])
os.Exit(1)
}

outDir, err := filepath.Abs(path)
Expand All @@ -42,7 +44,7 @@ func main() {
// regardless of where we run.
os.Setenv("TMPDIR", "/tmp")

alloyDBAuthProxy := cmd.NewCommand()
alloyDBAuthProxy.Execute()
doc.GenMarkdownTree(alloyDBAuthProxy.Command, outDir)
c := cmd.NewCommand()
c.Execute()
doc.GenMarkdownTree(c.Command, outDir)
}

0 comments on commit 78cc4dd

Please sign in to comment.