Skip to content

Commit

Permalink
Update fsnotify.go
Browse files Browse the repository at this point in the history
  • Loading branch information
leecha authored Dec 9, 2024
1 parent 89d89ed commit b581ef2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions fsnotify.go
Original file line number Diff line number Diff line change
Expand Up @@ -420,13 +420,15 @@ var debug = func() bool {
return os.Getenv("FSNOTIFY_DEBUG") == "1"
}()

var defaultOpts = WithOpts{
bufsize: 65536, // 64K
op: Create | Write | Remove | Rename | Chmod,
func defaultOpts() WithOpts{
return WithOpts {
bufsize: 65536, // 64K
op: Create | Write | Remove | Rename | Chmod,
}
}

func getOptions(opts ...AddOpt) WithOpts {
with := defaultOpts
with := defaultOpts()
for _, o := range opts {
if o != nil {
o(&with)
Expand Down

0 comments on commit b581ef2

Please sign in to comment.