helpgen

command
v0.0.517 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: Apache-2.0 Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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