Skip to content

Commit b8b00d9

Browse files
chore: fix some comments to improve readability (#7395)
Co-authored-by: Francis Lavoie <lavofr@gmail.com>
1 parent 68d5002 commit b8b00d9

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

caddy.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ func Load(cfgJSON []byte, forceReload bool) error {
147147
// the new value (if applicable; i.e. "DELETE" doesn't have an input).
148148
// If the resulting config is the same as the previous, no reload will
149149
// 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.
152152
// The ifMatchHeader can optionally be given a string of the format:
153153
//
154154
// "<path> <hash>"
@@ -1092,7 +1092,7 @@ type Event struct {
10921092
}
10931093

10941094
// 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.
10961096
//
10971097
// EXPERIMENTAL: Subject to change.
10981098
func NewEvent(ctx Context, name string, data map[string]any) (Event, error) {
@@ -1250,10 +1250,10 @@ func getLastConfig() (file, adapter string, fn reloadFromSourceFunc) {
12501250

12511251
// lastConfigMatches returns true if the provided source file and/or adapter
12521252
// 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.
12571257
func lastConfigMatches(srcFile, srcAdapter string) bool {
12581258
lf, la, _ := getLastConfig()
12591259

modules/logging/filewriter_test_windows.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ import (
2323
)
2424

2525
// 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.
2727
// 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
2929
// opened with R/W permissions by default on Windows too.
3030
func TestFileCreationMode(t *testing.T) {
3131
dir, err := os.MkdirTemp("", "caddytest")

0 commit comments

Comments
 (0)