mirror of
https://github.com/spf13/cobra
synced 2025-05-07 13:57:21 +00:00
fix: undefined er
This commit is contained in:
parent
89c7ffb512
commit
1f56e45afb
1 changed files with 6 additions and 0 deletions
|
@ -214,6 +214,7 @@ package cmd
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
homedir "github.com/mitchellh/go-homedir"
|
||||
"github.com/spf13/cobra"
|
||||
|
@ -255,6 +256,11 @@ func init() {
|
|||
rootCmd.AddCommand(initCmd)
|
||||
}
|
||||
|
||||
func er(msg interface{}) {
|
||||
fmt.Println("Error:", msg)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
func initConfig() {
|
||||
if cfgFile != "" {
|
||||
// Use config file from the flag.
|
||||
|
|
Loading…
Add table
Reference in a new issue