Skip to content

Commit 61f6015

Browse files
cleaning up some comments
1 parent b08ac73 commit 61f6015

File tree

5 files changed

+18
-7
lines changed

5 files changed

+18
-7
lines changed

config/checkdoc/main.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,9 @@ func checkConfiguration(filename, configType string, lineNum int) bool {
199199
func setupTempDir() func() {
200200
if tempDir != "" {
201201
_ = os.MkdirAll(tempDir, 0700)
202-
return func() {}
202+
return func() {
203+
// nothing to do
204+
}
203205
}
204206
tempDir, _ = os.MkdirTemp("", "checkdoc*")
205207
return func() {

main.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,9 @@ func openProfile(c *config.Config, profileName string) (profile *config.Profile,
373373
}
374374

375375
if cleanup == nil {
376-
cleanup = func() {}
376+
cleanup = func() {
377+
// nothing to do
378+
}
377379
}
378380
return
379381
}

schedule/handler_crond.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ func (h *HandlerCrond) Init() error {
3232
}
3333

3434
// Close does nothing with crond
35-
func (h *HandlerCrond) Close() {}
35+
func (h *HandlerCrond) Close() {
36+
// nothing to do
37+
}
3638

3739
func (h *HandlerCrond) ParseSchedules(schedules []string) ([]*calendar.Event, error) {
3840
return parseSchedules(schedules)
@@ -42,12 +44,12 @@ func (h *HandlerCrond) DisplayParsedSchedules(command string, events []*calendar
4244
displayParsedSchedules(command, events)
4345
}
4446

45-
// DisplaySchedules does nothing with launchd
47+
// DisplaySchedules does nothing with crond
4648
func (h *HandlerCrond) DisplaySchedules(command string, schedules []string) error {
4749
return nil
4850
}
4951

50-
// DisplayStatus does nothing with launchd
52+
// DisplayStatus does nothing with crond
5153
func (h *HandlerCrond) DisplayStatus(profileName string) error {
5254
return nil
5355
}

schedule/handler_darwin.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ func (h *HandlerLaunchd) Init() error {
8686
}
8787

8888
// Close does nothing with launchd
89-
func (h *HandlerLaunchd) Close() {}
89+
func (h *HandlerLaunchd) Close() {
90+
// nothing to do
91+
}
9092

9193
func (h *HandlerLaunchd) ParseSchedules(schedules []string) ([]*calendar.Event, error) {
9294
return parseSchedules(schedules)
@@ -101,6 +103,7 @@ func (h *HandlerLaunchd) DisplaySchedules(command string, schedules []string) er
101103
return nil
102104
}
103105

106+
// DisplayStatus does nothing with launchd
104107
func (h *HandlerLaunchd) DisplayStatus(profileName string) error {
105108
return nil
106109
}

schedule/handler_systemd.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ func (h *HandlerSystemd) Init() error {
6161
}
6262

6363
// Close does nothing with systemd
64-
func (h *HandlerSystemd) Close() {}
64+
func (h *HandlerSystemd) Close() {
65+
// nothing to do
66+
}
6567

6668
// ParseSchedules always returns nil on systemd
6769
func (h *HandlerSystemd) ParseSchedules(schedules []string) ([]*calendar.Event, error) {

0 commit comments

Comments
 (0)