Reconcile module docs and release materials
This commit is contained in:
7
app.go
7
app.go
@@ -6,7 +6,8 @@ import (
|
||||
commandmeta "gitea.maximumdirect.net/eric/CommandKit/internal/commandmeta"
|
||||
)
|
||||
|
||||
// App owns one command registry and its application identity.
|
||||
// App owns one command registry and its application identity. Each App has an
|
||||
// independent registry; command declarations may be reused across Apps.
|
||||
type App struct {
|
||||
identity Identity
|
||||
commands map[string]*commandNode
|
||||
@@ -23,7 +24,9 @@ type commandNode struct {
|
||||
}
|
||||
|
||||
// New creates an application with the supplied identity and initial commands.
|
||||
// The identity name must not be empty. The root help and version names are
|
||||
// The identity name must not be empty. New installs its generated help and
|
||||
// version commands and caller declarations as one batch; an invalid declaration
|
||||
// returns an error without exposing an App. The root help and version names are
|
||||
// reserved for generated commands.
|
||||
func New(identity Identity, commands ...Command) (*App, error) {
|
||||
if identity.Name == "" {
|
||||
|
||||
Reference in New Issue
Block a user