Skip to content

Commit

Permalink
golanglint-ci fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
erikostien-pingidentity committed Nov 12, 2024
1 parent 60c579e commit 9919220
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions internal/output/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,17 +115,15 @@ func printText(message string, fields map[string]interface{}, colorFunc func(for
logEventFunc func() *zerolog.Event) {
l := logger.Get()

if fields != nil {
for k, v := range fields {
switch typedValue := v.(type) {
// If the value is a json.RawMessage, print it as a string
case json.RawMessage:
fmt.Println(cyan("%s: \n%s", k, typedValue))
l.Info().Msg(cyan("%s: %s", k, typedValue))
default:
fmt.Println(cyan("%s: \n%v", k, v))
l.Info().Msg(cyan("%s: %v", k, v))
}
for k, v := range fields {
switch typedValue := v.(type) {
// If the value is a json.RawMessage, print it as a string
case json.RawMessage:
fmt.Println(cyan("%s: \n%s", k, typedValue))
l.Info().Msg(cyan("%s: %s", k, typedValue))
default:
fmt.Println(cyan("%s: \n%v", k, v))
l.Info().Msg(cyan("%s: %v", k, v))
}
}

Expand Down

0 comments on commit 9919220

Please sign in to comment.