chore: move fmtErr global var
parent
59c5aaa8d1
commit
0206b95bf0
5
main.go
5
main.go
|
@ -38,6 +38,10 @@ const (
|
|||
debugFlag = "debug"
|
||||
)
|
||||
|
||||
var (
|
||||
fmtErr = color.New(color.FgRed)
|
||||
)
|
||||
|
||||
func main() {
|
||||
a := &action{}
|
||||
|
||||
|
@ -88,7 +92,6 @@ func main() {
|
|||
|
||||
if err := app.Run(os.Args); err != nil {
|
||||
// Highlight error
|
||||
fmtErr := color.New(color.FgRed)
|
||||
fmtErr.Printf("[%s error]: ", appName)
|
||||
fmt.Printf("%s\n", err.Error())
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue