refactor(cli): change name -> appName
parent
dd720b777b
commit
db0c2e2c1f
6
main.go
6
main.go
|
@ -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())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue