Skip to content

Commit

Permalink
fix: fix int array type message
Browse files Browse the repository at this point in the history
Signed-off-by: black-desk <[email protected]>
  • Loading branch information
black-desk committed Jan 23, 2024
1 parent e68b7e4 commit 930da12
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,16 @@ func printWithMap(tmpl *template.Template, journalEntryMap map[string]any) (err
journalExtraMap := map[string]any{}

for k := range journalEntryMap {
if k == "MESSAGE" {
if interfaces, ok := journalEntryMap[k].([]interface{}); ok {
bytes := []byte{}
for i := range interfaces {
bytes = append(bytes, byte(interfaces[i].(float64)))
}
journalEntryMap[k] = string(bytes)
}
}

if isWellKnowField(k) {
continue
}
Expand Down

0 comments on commit 930da12

Please sign in to comment.