use filepath.Base instead of path.Base in Name & HelpName as default values.
This commit is contained in:
parent
bc465beccc
commit
3fb51f15e8
6
app.go
6
app.go
@ -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",
|
||||||
|
Loading…
Reference in New Issue
Block a user