Skip to content

Commit 257bf20

Browse files
committed
chore: lint updates
1 parent f81e30a commit 257bf20

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

cmd/main.go

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,13 @@ func writeToConsole(ch <-chan domain.UdpPayload) {
5555
case "ApiCall":
5656
if apiCall, err := domain.NewApiCall(msg); err == nil {
5757
if err := apiCall.Validate(); err == nil {
58-
//fmt.Println("Error sending WebSocket message:", err)
58+
t := time.Unix(apiCall.Timestamp/1000, 0).UTC()
59+
humanReadable := t.Format("2006-01-02 15:04:05 UTC")
60+
fmt.Printf("%s [ Client:%s(%s) ==========> AWS:%s:%s ] : %dms %s Code:%d\n",
61+
humanReadable, apiCall.ClientId, apiCall.UserAgent[:25], apiCall.Service, apiCall.Api, apiCall.Latency, apiCall.Region, apiCall.FinalHttpStatusCode)
62+
} else {
63+
fmt.Println("Error event validation")
5964
}
60-
t := time.Unix(apiCall.Timestamp/1000, 0).UTC()
61-
humanReadable := t.Format("2006-01-02 15:04:05 UTC")
62-
fmt.Printf("%s [ Client:%s(%s) ==========> AWS:%s:%s ] : %dms %s Code:%d\n",
63-
humanReadable, apiCall.ClientId, apiCall.UserAgent[:25], apiCall.Service, apiCall.Api, apiCall.Latency, apiCall.Region, apiCall.FinalHttpStatusCode)
6465
}
6566

6667
case "ApiCallAttempt":
@@ -70,6 +71,8 @@ func writeToConsole(ch <-chan domain.UdpPayload) {
7071
humanReadable := t.Format("2006-01-02 15:04:05 UTC")
7172
fmt.Printf("%s [ Client:%s(%s) ==========> AWS:%s:%s(%s) ] : %dms %s Code:%d\n",
7273
humanReadable, apiCallAttempt.ClientId, apiCallAttempt.UserAgent[:25], apiCallAttempt.Service, apiCallAttempt.Api, apiCallAttempt.Fqdn, apiCallAttempt.AttemptLatency, apiCallAttempt.Region, apiCallAttempt.HttpStatusCode)
74+
} else {
75+
fmt.Println("Error event validation")
7376
}
7477
}
7578
}

0 commit comments

Comments
 (0)