mirror of https://github.com/spf13/cobra.git
Rename main func to initConfig
The function called `main` in the manual creation example should be called `initConfig`.
This commit is contained in:
parent
f9d34972c1
commit
6471e3de04
|
@ -328,7 +328,7 @@ func Execute() {
|
||||||
RootCmd.Execute()
|
RootCmd.Execute()
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func initConfig() {
|
||||||
// Don't forget to read config either from cfgFile or from home directory!
|
// Don't forget to read config either from cfgFile or from home directory!
|
||||||
if cfgFile != "" {
|
if cfgFile != "" {
|
||||||
// Use config file from the flag.
|
// Use config file from the flag.
|
||||||
|
|
Loading…
Reference in New Issue