Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code confusion in function WatchConfig() #610

Closed
danielchang-Z opened this issue Dec 13, 2018 · 2 comments · Fixed by #1458
Closed

Code confusion in function WatchConfig() #610

danielchang-Z opened this issue Dec 13, 2018 · 2 comments · Fixed by #1458
Milestone

Comments

@danielchang-Z
Copy link

func (v *Viper) WatchConfig() {
   // ...
   else if filepath.Clean(event.Name) == configFile &&
   event.Op&fsnotify.Remove&fsnotify.Remove != 0 {
       eventsWG.Done()
       return
   }
   // ...
 }

This code segment makes me confused that the event.Op does AND-OPERATION with fsnotify.Remove twice . Is there some special purpose?

@arp242
Copy link

arp242 commented Nov 3, 2022

This was fixed, as my previous comment @sagikazarmark

@sagikazarmark sagikazarmark added this to the v1.14.0 milestone Nov 3, 2022
@sagikazarmark
Copy link
Collaborator

Thanks @arp242

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants