func (a *application) build() (err error) {
	a.Build()
	a.PrintStartupMessages()
	basename := filepath.Base(os.Args[0])
	basename = strings.ToLower(basename)
	basename = strings.TrimSuffix(basename, ".exe")
	f := a.ConfigurableFactory()
	f.SetInstance(app.ApplicationContextName, a)
	err = a.BuildConfigurations()
	if err != nil {
		return
	}
	r := f.GetInstance(RootCommandName)
	var root Command
	if r != nil {
		root = r.(Command)
		Register(root)
		a.root = root
		root.EmbeddedCommand().Use = basename
	}
	return
}
Init initialize cli application
package cli
import (
	"hidevops.io/hiboot/pkg/app"
	"os"
	"path/filepath"
	"strings"
)
type Application interface {
	app.Application
}
type application struct {
	app.BaseApplication
	root Command
}
type CommandNameValue struct {
	Name    string
	Command interface{}
}
const (
	RootCommandName = "cli.rootCommand"
)
func NewApplication(cmd ...interface{}) Application {
	a := new(application)
	a.initialize(cmd...)
	return a
}
func (a *application) initialize(cmd ...interface{}) (err error) {
	if len(cmd) > 0 {
		app.Register(RootCommandName, cmd[0])
	}
	err = a.Initialize()
	return
}