Skip to content

Commit

Permalink
avoid unnecessary empty slice allocation
Browse files Browse the repository at this point in the history
  • Loading branch information
mikebd committed Oct 6, 2023
1 parent 8be771c commit cf2fc9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion service/listLogs.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

// ListLogs returns a list of log files in the log directory that are readable by this service
func ListLogs(directoryPath string) ([]string, error) {
result := []string{}
var result []string

entries, err := os.ReadDir(directoryPath)
if err != nil {
Expand Down

0 comments on commit cf2fc9f

Please sign in to comment.