refactor(cli): change name -> appName

main
hau 2021-01-07 11:29:35 +07:00
parent dd720b777b
commit db0c2e2c1f
1 changed files with 3 additions and 3 deletions

View File

@ -18,7 +18,7 @@ import (
) )
const ( const (
name = "changeloguru" appName = "changeloguru"
currentDir = "." currentDir = "."
markdownFiletype = "md" markdownFiletype = "md"
@ -42,7 +42,7 @@ func main() {
a := &action{} a := &action{}
app := &cli.App{ app := &cli.App{
Name: name, Name: appName,
Usage: "generate changelog from conventional commits", Usage: "generate changelog from conventional commits",
Flags: []cli.Flag{ Flags: []cli.Flag{
&cli.StringFlag{ &cli.StringFlag{
@ -89,7 +89,7 @@ func main() {
if err := app.Run(os.Args); err != nil { if err := app.Run(os.Args); err != nil {
// Highlight error // Highlight error
fmtErr := color.New(color.FgRed) fmtErr := color.New(color.FgRed)
fmtErr.Printf("[%s error]: ", name) fmtErr.Printf("[%s error]: ", appName)
fmt.Printf("%s\n", err.Error()) fmt.Printf("%s\n", err.Error())
} }
} }