Skip to content

Commit 44a2d23

Browse files
committed
refactor: rename EnableUpdateChecking to DisableUpdateChecking
1 parent 1758482 commit 44a2d23

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

pcli.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ import (
1515

1616
var 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.
2222
func 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.
4141
func 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

0 commit comments

Comments
 (0)