]> go.fuhry.dev Git - fsnotify.git/commitdiff
gofmt 1.19
authorMartin Tournoij <martin@arp242.net>
Sat, 29 Oct 2022 18:23:14 +0000 (20:23 +0200)
committerMartin Tournoij <martin@arp242.net>
Sat, 29 Oct 2022 18:23:59 +0000 (20:23 +0200)
backend_fen.go
backend_inotify.go
backend_kqueue.go
backend_other.go
backend_windows.go
fsnotify.go
fsnotify_test.go
helpers_test.go
mkdoc.zsh

index b66bd3735d83877c39afa73bc00b74472a128939..c09ec3c0fac67c49c5808fcfbd66b2e1a0f82080 100644 (file)
@@ -23,9 +23,9 @@ import (
 // When a file is removed a Remove event won't be emitted until all file
 // descriptors are closed, and deletes will always emit a Chmod. For example:
 //
-//     fp := os.Open("file")
-//     os.Remove("file")        // Triggers Chmod
-//     fp.Close()               // Triggers Remove
+//     fp := os.Open("file")
+//     os.Remove("file")        // Triggers Chmod
+//     fp.Close()               // Triggers Remove
 //
 // This is the event that inotify sends, so not much can be changed about this.
 //
@@ -39,16 +39,16 @@ import (
 //
 // To increase them you can use sysctl or write the value to the /proc file:
 //
-//     # Default values on Linux 5.18
-//     sysctl fs.inotify.max_user_watches=124983
-//     sysctl fs.inotify.max_user_instances=128
+//     # Default values on Linux 5.18
+//     sysctl fs.inotify.max_user_watches=124983
+//     sysctl fs.inotify.max_user_instances=128
 //
 // To make the changes persist on reboot edit /etc/sysctl.conf or
 // /usr/lib/sysctl.d/50-default.conf (details differ per Linux distro; check
 // your distro's documentation):
 //
-//     fs.inotify.max_user_watches=124983
-//     fs.inotify.max_user_instances=128
+//     fs.inotify.max_user_watches=124983
+//     fs.inotify.max_user_instances=128
 //
 // Reaching the limit will result in a "no space left on device" or "too many open
 // files" error.
index 9581115620507c15be8a2af7440adadd9ab89c6a..d813453ec7310fdeb2d0c477e893a957f43743cd 100644 (file)
@@ -26,9 +26,9 @@ import (
 // When a file is removed a Remove event won't be emitted until all file
 // descriptors are closed, and deletes will always emit a Chmod. For example:
 //
-//     fp := os.Open("file")
-//     os.Remove("file")        // Triggers Chmod
-//     fp.Close()               // Triggers Remove
+//     fp := os.Open("file")
+//     os.Remove("file")        // Triggers Chmod
+//     fp.Close()               // Triggers Remove
 //
 // This is the event that inotify sends, so not much can be changed about this.
 //
@@ -42,16 +42,16 @@ import (
 //
 // To increase them you can use sysctl or write the value to the /proc file:
 //
-//     # Default values on Linux 5.18
-//     sysctl fs.inotify.max_user_watches=124983
-//     sysctl fs.inotify.max_user_instances=128
+//     # Default values on Linux 5.18
+//     sysctl fs.inotify.max_user_watches=124983
+//     sysctl fs.inotify.max_user_instances=128
 //
 // To make the changes persist on reboot edit /etc/sysctl.conf or
 // /usr/lib/sysctl.d/50-default.conf (details differ per Linux distro; check
 // your distro's documentation):
 //
-//     fs.inotify.max_user_watches=124983
-//     fs.inotify.max_user_instances=128
+//     fs.inotify.max_user_watches=124983
+//     fs.inotify.max_user_instances=128
 //
 // Reaching the limit will result in a "no space left on device" or "too many open
 // files" error.
index 27a407a47eda0b51f9b7218726ba784d44e326aa..8f370d18eb4bcc7743128c434eb9514451633076 100644 (file)
@@ -24,9 +24,9 @@ import (
 // When a file is removed a Remove event won't be emitted until all file
 // descriptors are closed, and deletes will always emit a Chmod. For example:
 //
-//     fp := os.Open("file")
-//     os.Remove("file")        // Triggers Chmod
-//     fp.Close()               // Triggers Remove
+//     fp := os.Open("file")
+//     os.Remove("file")        // Triggers Chmod
+//     fp.Close()               // Triggers Remove
 //
 // This is the event that inotify sends, so not much can be changed about this.
 //
@@ -40,16 +40,16 @@ import (
 //
 // To increase them you can use sysctl or write the value to the /proc file:
 //
-//     # Default values on Linux 5.18
-//     sysctl fs.inotify.max_user_watches=124983
-//     sysctl fs.inotify.max_user_instances=128
+//     # Default values on Linux 5.18
+//     sysctl fs.inotify.max_user_watches=124983
+//     sysctl fs.inotify.max_user_instances=128
 //
 // To make the changes persist on reboot edit /etc/sysctl.conf or
 // /usr/lib/sysctl.d/50-default.conf (details differ per Linux distro; check
 // your distro's documentation):
 //
-//     fs.inotify.max_user_watches=124983
-//     fs.inotify.max_user_instances=128
+//     fs.inotify.max_user_watches=124983
+//     fs.inotify.max_user_instances=128
 //
 // Reaching the limit will result in a "no space left on device" or "too many open
 // files" error.
index bec67c52caebe286026d14e2b7d99371c41a6f99..4429c8339a4099e2624ff1e203d91a280b274847 100644 (file)
@@ -18,9 +18,9 @@ import (
 // When a file is removed a Remove event won't be emitted until all file
 // descriptors are closed, and deletes will always emit a Chmod. For example:
 //
-//     fp := os.Open("file")
-//     os.Remove("file")        // Triggers Chmod
-//     fp.Close()               // Triggers Remove
+//     fp := os.Open("file")
+//     os.Remove("file")        // Triggers Chmod
+//     fp.Close()               // Triggers Remove
 //
 // This is the event that inotify sends, so not much can be changed about this.
 //
@@ -34,16 +34,16 @@ import (
 //
 // To increase them you can use sysctl or write the value to the /proc file:
 //
-//     # Default values on Linux 5.18
-//     sysctl fs.inotify.max_user_watches=124983
-//     sysctl fs.inotify.max_user_instances=128
+//     # Default values on Linux 5.18
+//     sysctl fs.inotify.max_user_watches=124983
+//     sysctl fs.inotify.max_user_instances=128
 //
 // To make the changes persist on reboot edit /etc/sysctl.conf or
 // /usr/lib/sysctl.d/50-default.conf (details differ per Linux distro; check
 // your distro's documentation):
 //
-//     fs.inotify.max_user_watches=124983
-//     fs.inotify.max_user_instances=128
+//     fs.inotify.max_user_watches=124983
+//     fs.inotify.max_user_instances=128
 //
 // Reaching the limit will result in a "no space left on device" or "too many open
 // files" error.
index 3f7e18368fcaaf06e657be43eeee7bb4f7923101..24b5b840480046b7e6650030b9d887c7b1166159 100644 (file)
@@ -27,9 +27,9 @@ import (
 // When a file is removed a Remove event won't be emitted until all file
 // descriptors are closed, and deletes will always emit a Chmod. For example:
 //
-//     fp := os.Open("file")
-//     os.Remove("file")        // Triggers Chmod
-//     fp.Close()               // Triggers Remove
+//     fp := os.Open("file")
+//     os.Remove("file")        // Triggers Chmod
+//     fp.Close()               // Triggers Remove
 //
 // This is the event that inotify sends, so not much can be changed about this.
 //
@@ -43,16 +43,16 @@ import (
 //
 // To increase them you can use sysctl or write the value to the /proc file:
 //
-//     # Default values on Linux 5.18
-//     sysctl fs.inotify.max_user_watches=124983
-//     sysctl fs.inotify.max_user_instances=128
+//     # Default values on Linux 5.18
+//     sysctl fs.inotify.max_user_watches=124983
+//     sysctl fs.inotify.max_user_instances=128
 //
 // To make the changes persist on reboot edit /etc/sysctl.conf or
 // /usr/lib/sysctl.d/50-default.conf (details differ per Linux distro; check
 // your distro's documentation):
 //
-//     fs.inotify.max_user_watches=124983
-//     fs.inotify.max_user_instances=128
+//     fs.inotify.max_user_watches=124983
+//     fs.inotify.max_user_instances=128
 //
 // Reaching the limit will result in a "no space left on device" or "too many open
 // files" error.
index 37b343154ca03599668789d00c5e1a578917f453..30653e3bb59bf526fc965b56b187d7d042881198 100644 (file)
@@ -3,10 +3,10 @@
 //
 // Currently supported systems:
 //
-//    Linux 2.6.32+    via inotify
-//    BSD, macOS       via kqueue
-//    Windows          via ReadDirectoryChangesW
-//    illumos          via FEN
+//     Linux 2.6.32+    via inotify
+//     BSD, macOS       via kqueue
+//     Windows          via ReadDirectoryChangesW
+//     illumos          via FEN
 package fsnotify
 
 import (
index beb2c62d7a661d49b95f8ce4288a4fd2a1f3887a..12a284bef92d01844af5bf4e07be81538f26ac01 100644 (file)
@@ -768,7 +768,7 @@ func TestWatchRm(t *testing.T) {
 }
 
 // TODO: this fails reguarly in the CI; not sure if it's a bug with the test or
-//       code; need to look in to it.
+// code; need to look in to it.
 func TestClose(t *testing.T) {
        chanClosed := func(t *testing.T, w *Watcher) {
                t.Helper()
@@ -988,7 +988,7 @@ func TestAdd(t *testing.T) {
 }
 
 // TODO: should also check internal state is correct/cleaned up; e.g. no
-//       left-over file descriptors or whatnot.
+// left-over file descriptors or whatnot.
 func TestRemove(t *testing.T) {
        t.Run("works", func(t *testing.T) {
                t.Parallel()
index 00f3bf468811b8c95b9c4746f002a95afd7f9158..85c1fc2be3e2623e71f07ca18e2f82ceb22a865a 100644 (file)
@@ -429,8 +429,8 @@ func (e Events) copy() Events {
 
 // Create a new Events list from a string; for example:
 //
-//   CREATE        path
-//   CREATE|WRITE  path
+//     CREATE        path
+//     CREATE|WRITE  path
 //
 // Every event is one line, and any whitespace between the event and path are
 // ignored. The path can optionally be surrounded in ". Anything after a "#" is
@@ -438,12 +438,12 @@ func (e Events) copy() Events {
 //
 // Platform-specific tests can be added after GOOS:
 //
-//   # Tested if nothing else matches
-//   CREATE   path
+//     # Tested if nothing else matches
+//     CREATE   path
 //
-//   # Windows-specific test.
-//   windows:
-//     WRITE    path
+//     # Windows-specific test.
+//     windows:
+//       WRITE    path
 //
 // You can specify multiple platforms with a comma (e.g. "windows, linux:").
 // "kqueue" is a shortcut for all kqueue systems (BSD, macOS).
index 157f425c5f6c2f0d21a892de1fd478cdae0d739c..25bc760f8c71fd1390310e256af1241b66fede54 100755 (executable)
--- a/mkdoc.zsh
+++ b/mkdoc.zsh
@@ -16,9 +16,9 @@ watcher=$(<<EOF
 // When a file is removed a Remove event won't be emitted until all file
 // descriptors are closed, and deletes will always emit a Chmod. For example:
 //
-//     fp := os.Open("file")
-//     os.Remove("file")        // Triggers Chmod
-//     fp.Close()               // Triggers Remove
+//     fp := os.Open("file")
+//     os.Remove("file")        // Triggers Chmod
+//     fp.Close()               // Triggers Remove
 //
 // This is the event that inotify sends, so not much can be changed about this.
 //
@@ -32,16 +32,16 @@ watcher=$(<<EOF
 //
 // To increase them you can use sysctl or write the value to the /proc file:
 //
-//     # Default values on Linux 5.18
-//     sysctl fs.inotify.max_user_watches=124983
-//     sysctl fs.inotify.max_user_instances=128
+//     # Default values on Linux 5.18
+//     sysctl fs.inotify.max_user_watches=124983
+//     sysctl fs.inotify.max_user_instances=128
 //
 // To make the changes persist on reboot edit /etc/sysctl.conf or
 // /usr/lib/sysctl.d/50-default.conf (details differ per Linux distro; check
 // your distro's documentation):
 //
-//     fs.inotify.max_user_watches=124983
-//     fs.inotify.max_user_instances=128
+//     fs.inotify.max_user_watches=124983
+//     fs.inotify.max_user_instances=128
 //
 // Reaching the limit will result in a "no space left on device" or "too many open
 // files" error.