clidoc

package
v0.10.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 20, 2019 License: Apache-2.0 Imports: 7 Imported by: 7

README

Generate standard Solo.io documentation from Cobra CLIs

  • Takes the entry point to a Cobra CLI (the root *cobra.CMD) and produces files formatted for Solo's online documentation

Example usage

  • from Squash:
package main

import (
	"log"

	"github.com/solo-io/go-utils/clidoc"

	"github.com/solo-io/squash/pkg/squashctl"
	"github.com/solo-io/squash/pkg/version"
)

func main() {
	app, err := squashctl.App(version.Version)
	if err != nil {
		log.Fatal(err)
	}
	clidoc.MustGenerateCliDocs(app)
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateCliDocs

func GenerateCliDocs(app *cobra.Command) error

GenerateCliDocs is the official way to convert Solo.io's command line tools to online documentation. It applies the file formatting and directory placement expected by Solo's documentation conventions.

func MustGenerateCliDocs

func MustGenerateCliDocs(app *cobra.Command)

MustGenerateCliDocs is the same as GenerateCliDocs but it exits with status 1 on error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL