diff --git a/cloudflare/queues/message.go b/cloudflare/queues/message.go index dfdb7ac..bf41a48 100644 --- a/cloudflare/queues/message.go +++ b/cloudflare/queues/message.go @@ -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. @@ -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, diff --git a/cloudflare/queues/message_test.go b/cloudflare/queues/message_test.go index f461970..ab21208 100644 --- a/cloudflare/queues/message_test.go +++ b/cloudflare/queues/message_test.go @@ -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 { diff --git a/cloudflare/queues/messagebatch_test.go b/cloudflare/queues/messagebatch_test.go index 2c58777..0f847dc 100644 --- a/cloudflare/queues/messagebatch_test.go +++ b/cloudflare/queues/messagebatch_test.go @@ -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 {