Skip to content

Commit 5d6f36f

Browse files
author
Peiyu Wu
committed
fix format issue
1 parent 20a2917 commit 5d6f36f

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

events/kafka.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@
33
package events
44

55
type KafkaEvent struct {
6-
EventSource string `json:"eventSource"`
7-
EventSourceARN string `json:"eventSourceArn"`
8-
Records map[string][]KafkaRecord `json:"records"`
9-
BootstrapServers string `json:"bootstrapServers"`
6+
EventSource string `json:"eventSource"`
7+
EventSourceARN string `json:"eventSourceArn"`
8+
Records map[string][]KafkaRecord `json:"records"`
9+
BootstrapServers string `json:"bootstrapServers"`
1010
}
1111

1212
type KafkaRecord struct {
13-
Topic string `json:"topic"`
14-
Partition int64 `json:"partition"`
15-
Offset int64 `json:"offset"`
16-
Timestamp MilliSecondsEpochTime `json:"timestamp"`
17-
TimestampType string `json:"timestampType"`
18-
Key string `json:"key,omitempty"`
19-
Value string `json:"value,omitempty"`
20-
Headers []map[string][]byte `json:"headers"`
13+
Topic string `json:"topic"`
14+
Partition int64 `json:"partition"`
15+
Offset int64 `json:"offset"`
16+
Timestamp MilliSecondsEpochTime `json:"timestamp"`
17+
TimestampType string `json:"timestampType"`
18+
Key string `json:"key,omitempty"`
19+
Value string `json:"value,omitempty"`
20+
Headers []map[string][]byte `json:"headers"`
2121
}

events/kafka_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func TestKafkaEventMarshaling(t *testing.T) {
2929
assert.Equal(t, 2020, utc.Year())
3030
assert.Equal(t, record.Key, "OGQ1NTk2YjQtMTgxMy00MjM4LWIyNGItNmRhZDhlM2QxYzBj")
3131
assert.Equal(t, record.Value, "OGQ1NTk2YjQtMTgxMy00MjM4LWIyNGItNmRhZDhlM2QxYzBj")
32-
32+
3333
for _, header := range record.Headers {
3434
for key, value := range header {
3535
assert.Equal(t, key, "headerKey")

0 commit comments

Comments
 (0)