From 6cb294f9b25db944140869a0a526c45e19ec48dd Mon Sep 17 00:00:00 2001 From: Martin Tournoij Date: Sat, 29 Oct 2022 20:23:14 +0200 Subject: [PATCH] gofmt 1.19 --- backend_fen.go | 16 ++++++++-------- backend_inotify.go | 16 ++++++++-------- backend_kqueue.go | 16 ++++++++-------- backend_other.go | 16 ++++++++-------- backend_windows.go | 16 ++++++++-------- fsnotify.go | 8 ++++---- fsnotify_test.go | 4 ++-- helpers_test.go | 14 +++++++------- mkdoc.zsh | 16 ++++++++-------- 9 files changed, 61 insertions(+), 61 deletions(-) diff --git a/backend_fen.go b/backend_fen.go index b66bd37..c09ec3c 100644 --- a/backend_fen.go +++ b/backend_fen.go @@ -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. diff --git a/backend_inotify.go b/backend_inotify.go index 9581115..d813453 100644 --- a/backend_inotify.go +++ b/backend_inotify.go @@ -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. diff --git a/backend_kqueue.go b/backend_kqueue.go index 27a407a..8f370d1 100644 --- a/backend_kqueue.go +++ b/backend_kqueue.go @@ -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. diff --git a/backend_other.go b/backend_other.go index bec67c5..4429c83 100644 --- a/backend_other.go +++ b/backend_other.go @@ -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. diff --git a/backend_windows.go b/backend_windows.go index 3f7e183..24b5b84 100644 --- a/backend_windows.go +++ b/backend_windows.go @@ -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. diff --git a/fsnotify.go b/fsnotify.go index 37b3431..30653e3 100644 --- a/fsnotify.go +++ b/fsnotify.go @@ -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 ( diff --git a/fsnotify_test.go b/fsnotify_test.go index beb2c62..12a284b 100644 --- a/fsnotify_test.go +++ b/fsnotify_test.go @@ -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() diff --git a/helpers_test.go b/helpers_test.go index 00f3bf4..85c1fc2 100644 --- a/helpers_test.go +++ b/helpers_test.go @@ -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). diff --git a/mkdoc.zsh b/mkdoc.zsh index 157f425..25bc760 100755 --- a/mkdoc.zsh +++ b/mkdoc.zsh @@ -16,9 +16,9 @@ watcher=$(<