An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

melato.org/command

Package command is used to create command line interfaces (CLI), using reflection to define command flags (options) from the public (exported) fields of any Go struct type. It also uses reflection to map other command line arguments (after flags) to the arguments of the command's Run method. It supports scalar fields (string, int, ...). It also supports struct or struct pointer fields, whose fields are also added as flags. The optional "name" and "usage" field tags are used to set the flag name and usage, or to exclude a field from being used as a flag. See demo.App for an example. A command has a hierarchy of sub-commands. Each sub-command can have additional flags. Flag default values cab be specified in an optional Init() method. Flag validation can be performed in an optional Configured() method. command uses the Go flags package for command-line processing.

Ecosystem
proxy.golang.org
Latest Release
v1.0.1
almost 3 years ago
Versions
3
Dependent Packages
4
Dependent Repos
2
Links
Registry proxy.golang.org
Homepage Homepage
Docs Documentation
JSON API View JSON
CodeMeta codemeta.json
Package Details
PURL pkg:golang/melato.org/command
spec
License Apache-2.0
Namespace melato.org
First Release about 4 years ago
Last Synced 17 days ago
Keywords
cli go golang reflection
Repository
Stars 1 on GitHub
Forks 0 on GitHub
Commits 64
Committers 1
Avg per Author 64.0
DDS 0.0
Rankings on proxy.golang.org
Dependent packages Top 2.8%
Dependent repos Top 3.5%