mirror of
https://github.com/spf13/cobra
synced 2024-11-24 22:57:12 +00:00
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
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue