Skip to content

Commit

Permalink
rename Id to ID
Browse files Browse the repository at this point in the history
  • Loading branch information
syumai committed Jan 15, 2025
1 parent 13b10a6 commit 9047d7f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions cloudflare/queues/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ type Message struct {
// instance - The underlying instance of the JS message object passed by the cloudflare
instance js.Value

// Id - The unique Cloudflare-generated identifier of the message
Id string
// ID - The unique Cloudflare-generated identifier of the message
ID string
// Timestamp - The time when the message was enqueued
Timestamp time.Time
// Body - The message body. Could be accessed directly or using converting helpers as StringBody, BytesBody, IntBody, FloatBody.
Expand All @@ -32,7 +32,7 @@ func newMessage(obj js.Value) (*Message, error) {

return &Message{
instance: obj,
Id: obj.Get("id").String(),
ID: obj.Get("id").String(),
Body: obj.Get("body"),
Attempts: obj.Get("attempts").Int(),
Timestamp: timestamp,
Expand Down
4 changes: 2 additions & 2 deletions cloudflare/queues/message_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ func TestNewConsumerMessage(t *testing.T) {
t.Fatalf("Body() = %v, want %v", body, "hello")
}

if got.Id != id {
t.Fatalf("Id = %v, want %v", got.Id, id)
if got.ID != id {
t.Fatalf("ID = %v, want %v", got.ID, id)
}

if got.Attempts != 1 {
Expand Down
4 changes: 2 additions & 2 deletions cloudflare/queues/messagebatch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ func TestNewConsumerMessageBatch(t *testing.T) {
t.Fatalf("Body() = %v, want %v", body, "hello")
}

if msg.Id != id {
t.Fatalf("Id = %v, want %v", msg.Id, id)
if msg.ID != id {
t.Fatalf("ID = %v, want %v", msg.ID, id)
}

if msg.Attempts != 1 {
Expand Down

0 comments on commit 9047d7f

Please sign in to comment.