diff --git a/config/checkdoc/main.go b/config/checkdoc/main.go index 5d136de3..65853b17 100644 --- a/config/checkdoc/main.go +++ b/config/checkdoc/main.go @@ -199,7 +199,9 @@ func checkConfiguration(filename, configType string, lineNum int) bool { func setupTempDir() func() { if tempDir != "" { _ = os.MkdirAll(tempDir, 0700) - return func() {} + return func() { + // nothing to do + } } tempDir, _ = os.MkdirTemp("", "checkdoc*") return func() { diff --git a/main.go b/main.go index d3fa00a9..cb75df1d 100644 --- a/main.go +++ b/main.go @@ -373,7 +373,9 @@ func openProfile(c *config.Config, profileName string) (profile *config.Profile, } if cleanup == nil { - cleanup = func() {} + cleanup = func() { + // nothing to do + } } return } diff --git a/schedule/handler_crond.go b/schedule/handler_crond.go index cde0863a..07bdff70 100644 --- a/schedule/handler_crond.go +++ b/schedule/handler_crond.go @@ -32,7 +32,9 @@ func (h *HandlerCrond) Init() error { } // Close does nothing with crond -func (h *HandlerCrond) Close() {} +func (h *HandlerCrond) Close() { + // nothing to do +} func (h *HandlerCrond) ParseSchedules(schedules []string) ([]*calendar.Event, error) { return parseSchedules(schedules) @@ -42,12 +44,12 @@ func (h *HandlerCrond) DisplayParsedSchedules(command string, events []*calendar displayParsedSchedules(command, events) } -// DisplaySchedules does nothing with launchd +// DisplaySchedules does nothing with crond func (h *HandlerCrond) DisplaySchedules(command string, schedules []string) error { return nil } -// DisplayStatus does nothing with launchd +// DisplayStatus does nothing with crond func (h *HandlerCrond) DisplayStatus(profileName string) error { return nil } diff --git a/schedule/handler_darwin.go b/schedule/handler_darwin.go index 610063f7..bf9266c3 100644 --- a/schedule/handler_darwin.go +++ b/schedule/handler_darwin.go @@ -86,7 +86,9 @@ func (h *HandlerLaunchd) Init() error { } // Close does nothing with launchd -func (h *HandlerLaunchd) Close() {} +func (h *HandlerLaunchd) Close() { + // nothing to do +} func (h *HandlerLaunchd) ParseSchedules(schedules []string) ([]*calendar.Event, error) { return parseSchedules(schedules) @@ -101,6 +103,7 @@ func (h *HandlerLaunchd) DisplaySchedules(command string, schedules []string) er return nil } +// DisplayStatus does nothing with launchd func (h *HandlerLaunchd) DisplayStatus(profileName string) error { return nil } diff --git a/schedule/handler_systemd.go b/schedule/handler_systemd.go index 9a3ea409..621d4427 100644 --- a/schedule/handler_systemd.go +++ b/schedule/handler_systemd.go @@ -61,7 +61,9 @@ func (h *HandlerSystemd) Init() error { } // Close does nothing with systemd -func (h *HandlerSystemd) Close() {} +func (h *HandlerSystemd) Close() { + // nothing to do +} // ParseSchedules always returns nil on systemd func (h *HandlerSystemd) ParseSchedules(schedules []string) ([]*calendar.Event, error) {