@marcel91200 / caddy Mirror · read-only / commits / b8b00d91
Fork 0

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

Mirrored from https://github.com/Slazee/caddy.git

Synced Nov 11, 16:00 UTC

chore: fix some comments to improve readability (#7395)

Co-authored-by: Francis Lavoie <lavofr@gmail.com>

wangjingcun committed Feb 17, 2026 at 03:41 UTC b8b00d91606c897ad37dc96a165a25e6ba616b35
2 files changed +9 -9
caddy.go
+7 -7
@@ -147,8 +147,8 @@ func Load(cfgJSON []byte, forceReload bool) error {
147 // the new value (if applicable; i.e. "DELETE" doesn't have an input).
148 // If the resulting config is the same as the previous, no reload will
149 // occur unless forceReload is true. If the config is unchanged and not
150 -// forcefully reloaded, then errConfigUnchanged This function is safe for
151 -// concurrent use.
150 +// forcefully reloaded, then errConfigUnchanged is returned. This function
151 +// is safe for concurrent use.
152 // The ifMatchHeader can optionally be given a string of the format:
153 //
154 // "<path> <hash>"
@@ -1092,7 +1092,7 @@ type Event struct {
1092 }
1093
1094 // NewEvent creates a new event, but does not emit the event. To emit an
1095 -// event, call Emit() on the current instance of the caddyevents app insteaad.
1095 +// event, call Emit() on the current instance of the caddyevents app instead.
1096 //
1097 // EXPERIMENTAL: Subject to change.
1098 func NewEvent(ctx Context, name string, data map[string]any) (Event, error) {
@@ -1250,10 +1250,10 @@ func getLastConfig() (file, adapter string, fn reloadFromSourceFunc) {
1250
1251 // lastConfigMatches returns true if the provided source file and/or adapter
1252 // matches the recorded last-config. Matching rules (in priority order):
1253 -// 1. If srcAdapter is provided and differs from the recorded adapter, no match.
1254 -// 2. If srcFile exactly equals the recorded file, match.
1255 -// 3. If both sides can be made absolute and equal, match.
1256 -// 4. If basenames are equal, match.
1253 +// 1. If srcAdapter is provided and differs from the recorded adapter, no match.
1254 +// 2. If srcFile exactly equals the recorded file, match.
1255 +// 3. If both sides can be made absolute and equal, match.
1256 +// 4. If basenames are equal, match.
1257 func lastConfigMatches(srcFile, srcAdapter string) bool {
1258 lf, la, _ := getLastConfig()
1259
modules/logging/filewriter_test_windows.go
+2 -2
@@ -23,9 +23,9 @@ import (
23 )
24
25 // Windows relies on ACLs instead of unix permissions model.
26 -// Go allows to open files with a particular mode put it is limited to read or write.
26 +// Go allows to open files with a particular mode but it is limited to read or write.
27 // See https://cs.opensource.google/go/go/+/refs/tags/go1.22.3:src/syscall/syscall_windows.go;l=708.
28 -// This is pretty restrictive and has few interest for log files and thus we just test that log files are
28 +// This is pretty restrictive and has little interest for log files and thus we just test that log files are
29 // opened with R/W permissions by default on Windows too.
30 func TestFileCreationMode(t *testing.T) {
31 dir, err := os.MkdirTemp("", "caddytest")