Categorygithub.com/grafana/clireadme
modulepackage
0.1.0
Repository: https://github.com/grafana/clireadme.git
Documentation: pkg.go.dev

# README

clireadme

A small library that helps to update the documentation in the README file of cobra-based CLI tools.

Usage

Create a tools/gendoc/main.go file with the following content (the Main function must be called with your own cobra Command as a parameter).

Then run: go run ./tools/gendoc README.md

// Package main contains CLI documentation generator tool.
package main

import (
	"github.com/grafana/clireadme"
	"github.com/grafana/k6tb/cmd"
)

func main() {
	clireadme.Main(cmd.New())
}

# Functions

Main updates the markdown documentation recursively based on cobra Command.
Update updates the markdown documentation recursively based on cobra Command.