Documentation ¶
Overview ¶
Package docgen provides common logic for generating markdown doctrees from a root cobra.Command for the vitessio/website repository.
Example usage:
package main import ( "github.com/spf13/cobra" "github.com/estuary/vitess/go/cmd/internal/docgen" vtctldclient "github.com/estuary/vitess/go/cmd/vtctldclient/command" ) func main() { cmd := &cobra.Command{ RunE: func(cmd *cobra.Command, args []string) error { dir := cmd.Flags().Arg(0) return docgen.GenerateMarkdownTree(vtctldclient.Root, dir) } Args: cobra.ExactArgs(1), } cmd.Execute() }
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateMarkdownTree ¶
GenerateMarkdownTree generates a markdown doctree for the root cobra.Command written to `dir`. The root command is also renamed to _index.md to remain compatible with the vitessio/website content structure expectations.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.