func NewApp() *App {
	return &App{
		Name:         filepath.Base(os.Args[0]),
		HelpName:     filepath.Base(os.Args[0]),
		Usage:        "A new cli application",
		UsageText:    "",
		BashComplete: DefaultAppComplete,
		Action:       helpCommand.Action,
		Compiled:     compileTime(),
		Writer:       os.Stdout,
	}
}
NewApp creates a new cli Application with some reasonable defaults for Name,
Usage, Version and Action.
package cli
import (
	"context"
	"flag"
	"fmt"
	"io"
	"os"
	"path/filepath"
	"sort"
	"time"
)
var (
	changeLogURL            = "https://github.com/urfave/cli/blob/master/docs/CHANGELOG.md"
	appActionDeprecationURL = fmt.Sprintf("%s#deprecated-cli-app-action-signature", changeLogURL)
	contactSysadmin         = "This is an error in the application.  Please contact the distributor of this application if this is not you."
	errInvalidActionType    = NewExitError("ERROR invalid Action type. "+
		fmt.Sprintf("Must be `func(*Context`)` or `func(*Context) error).  %s", contactSysadmin)+
		fmt.Sprintf("See %s", appActionDeprecationURL), 2)
)
type App struct {
	Name string
	HelpName string
	Usage string
	UsageText string
	ArgsUsage string
	Version string
	Description string
	Commands []*Command
	Flags []Flag
	EnableBashCompletion bool
	HideHelp bool
	HideHelpCommand bool
	HideVersion bool
	categories CommandCategories
	BashComplete BashCompleteFunc
	Before BeforeFunc
	After AfterFunc
	Action ActionFunc
	CommandNotFound CommandNotFoundFunc
	OnUsageError OnUsageErrorFunc
	Compiled time.Time
	Authors []*Author
	Copyright string
	Writer io.Writer
	ErrWriter io.Writer
	ExitErrHandler ExitErrHandlerFunc
	Metadata map[string]interface{}
	ExtraInfo func() map[string]string
	CustomAppHelpTemplate string
	UseShortOptionHandling bool
	didSetup bool
}
func compileTime() time.Time {
	info, err := os.Stat(os.Args[0])
	if err != nil {
		return time.Now()
	}
	return info.ModTime()
}