main.go
main.go - Overview
This file generates markdown documentation for DiceDB commands based on a template and the command registry.
Detailed Documentation
const DocsCommandsDirectory
Specifies the directory where the generated command documentation files will be stored.
func generateDocs(tmpl *template.Template, c *cmd.CommandMeta)
Purpose: Generates a markdown documentation file for a given command.
Parameters:
tmpl
: A pointer to atemplate.Template
representing the template to use for generating the documentation.c
: A pointer to acmd.CommandMeta
containing the metadata for the command.
Returns: None
func main()
Purpose: The main function that drives the documentation generation process. It parses the template file, iterates through the command registry, and generates documentation for each command that has a non-empty HelpLong
field.
Parameters: None
Returns: None