Skip to content

Commit

Permalink
fix: modified captures separator to , instead |
Browse files Browse the repository at this point in the history
This is made to facilitate the parsing of the results outside
  • Loading branch information
Velka-DEV committed Nov 29, 2023
1 parent 410b0d0 commit 03bdc3d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pkg/core/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,13 @@ func WriteResultToFile(result *CheckResult, info *CheckerInfo) error {
sort.Strings(keys)

// Iterate over the sorted keys
for _, key := range keys {
sb.WriteString(fmt.Sprintf("|%s=%s", key, result.Captures[key]))
for i, key := range keys {

if i == 0 {
sb.WriteString(fmt.Sprintf("|%s=%s", key, result.Captures[key]))
continue
}
sb.WriteString(fmt.Sprintf(",%s=%s", key, result.Captures[key]))
}

sb.WriteString(fmt.Sprintf("|%s", info.StartTime.Format("2006-01-02 15:04:05")))
Expand Down

0 comments on commit 03bdc3d

Please sign in to comment.