Discover Packages
github.com/solo-io/go-utils
clidoc
package
Version:
v0.10.9
Opens a new window with list of versions in this module.
Published: Sep 20, 2019
License: Apache-2.0
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 7
Opens a new window with list of known importers.
README
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
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)
}
Expand ▾
Collapse ▴
Documentation
¶
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.
MustGenerateCliDocs is the same as GenerateCliDocs but it exits with status 1 on error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.