File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,8 +15,8 @@ import (
1515
1616var rootCmd * cobra.Command
1717
18- // EnableUpdateChecking automatically checks if a new version of your application is pushed, and notifies the user.
19- var EnableUpdateChecking = true
18+ // DisableUpdateChecking automatically checks if a new version of your application is pushed, and notifies the user.
19+ var DisableUpdateChecking = false
2020
2121// SetRootCmd sets your rootCmd.
2222func SetRootCmd (cmd * cobra.Command ) {
@@ -37,9 +37,9 @@ func Setup() {
3737 rootCmd .SetErr (Err ())
3838}
3939
40- // CheckForUpdates checks if a new version of your application is pushed, and notifies the user, if EnableUpdateChecking is true.
40+ // CheckForUpdates checks if a new version of your application is pushed, and notifies the user, if DisableUpdateChecking is true.
4141func CheckForUpdates () error {
42- if EnableUpdateChecking {
42+ if ! DisableUpdateChecking {
4343 resp , err := http .Get (pterm .Sprintf ("https://api.github.com/repos/%s/releases/latest" , getRepoPath ()))
4444 if err != nil {
4545 return err
You can’t perform that action at this time.
0 commit comments