Merge pull request #349 from Felamande/master

use filepath.Base instead of path.Base in Name & HelpName as default.
This commit is contained in:
Jesse Szwedko 2016-04-03 18:54:34 -07:00
commit 71f57d300d

6
app.go
View File

@ -5,7 +5,7 @@ import (
"io" "io"
"io/ioutil" "io/ioutil"
"os" "os"
"path" "path/filepath"
"sort" "sort"
"time" "time"
) )
@ -80,8 +80,8 @@ func compileTime() time.Time {
// Creates a new cli Application with some reasonable defaults for Name, Usage, Version and Action. // Creates a new cli Application with some reasonable defaults for Name, Usage, Version and Action.
func NewApp() *App { func NewApp() *App {
return &App{ return &App{
Name: path.Base(os.Args[0]), Name: filepath.Base(os.Args[0]),
HelpName: path.Base(os.Args[0]), HelpName: filepath.Base(os.Args[0]),
Usage: "A new cli application", Usage: "A new cli application",
UsageText: "", UsageText: "",
Version: "0.0.0", Version: "0.0.0",