use filepath.Base instead of path.Base in Name & HelpName as default values.

This commit is contained in:
Felamande 2016-04-03 17:50:08 +08:00
parent bc465beccc
commit 3fb51f15e8

6
app.go
View File

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