mirror of
https://github.com/spf13/cobra
synced 2025-05-05 21:07:24 +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
d638dcb7c7
commit
6e4fbe0847
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…
Add table
Reference in a new issue