Skip to content

Commit

Permalink
Added generate-docs command to tealdbg (#3830)
Browse files Browse the repository at this point in the history
When generating the CLI documentation for the Developer Portal
it was noticed that tealdbg was missing. Much like goal, kmd, and algokey,
added the "generate-docs" command option to generate the markdown output.
  • Loading branch information
nullun authored May 25, 2022
1 parent c9f4151 commit 2df7468
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions cmd/tealdbg/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,23 @@ import (

"github.com/gorilla/mux"
"github.com/spf13/cobra"
"github.com/spf13/cobra/doc"

cmdutil "github.com/algorand/go-algorand/cmd/util"
)

func main() {
// Hidden command to generate docs in a given directory
// tealdbg generate-docs [path]
if len(os.Args) == 3 && os.Args[1] == "generate-docs" {
err := doc.GenMarkdownTree(rootCmd, os.Args[2])
if err != nil {
log.Println(err)
os.Exit(1)
}
os.Exit(0)
}

if err := rootCmd.Execute(); err != nil {
log.Println(err)
os.Exit(1)
Expand Down

0 comments on commit 2df7468

Please sign in to comment.