Skip to content

Commit

Permalink
cleaning up some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
creativeprojects committed Sep 24, 2023
1 parent b08ac73 commit 61f6015
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 7 deletions.
4 changes: 3 additions & 1 deletion config/checkdoc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
4 changes: 3 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
8 changes: 5 additions & 3 deletions schedule/handler_crond.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
}
Expand Down
5 changes: 4 additions & 1 deletion schedule/handler_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
}
Expand Down
4 changes: 3 additions & 1 deletion schedule/handler_systemd.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 61f6015

Please sign in to comment.