helpgen

command
v0.0.233-pre-8 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

README

helpgen

Code generator for help strings. Generator is helpgen.go. Currently outputs to stdout. Takes the name of a .toml file.

Toml file format (currently):

[info]
usage="info"
shortHelp="Show detailed app information"
longHelp="""Shows information about the application on the Fly platform

Information includes the application's
* name, owner, version, status and hostname
* services
* IP addresses
"""

Help TOML file is flyctlhelp.toml

run

go run helpgen/helpgen.go helpgen/flyctlhelp.toml > docstrings/flyctldocstrings.go

To generate docstrings/flyctldocstrings.go

package docstrings

var docstrings=map[string]KeyStrings{
"info":KeyStrings{"info","Show detailed app information",
    `Shows information about the application on the Fly platform

Information includes the application's
* name, owner, version, status and hostname
* services
* IP addresses
`,
},
}

This contains a literal initialised map of all the KeyStrings. Consumed by docstrings/docstrings.go

TODO: Add Flag and Example support

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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