Skip to content

Commit

Permalink
Spelling fixes
Browse files Browse the repository at this point in the history
"Recieve" -> "Receive". D'oh!

The pkg/connector/ble/ble.go method had both Receive and Recieve
methods. Deleting the latter is an API-breaking change, but such changes
should be expected in v0.x.x according to Go semantic versioning
standards.
  • Loading branch information
sethterashima committed Dec 9, 2023
1 parent 71d7881 commit 9c37f2a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion internal/dispatcher/dispatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ func (d *Dispatcher) Send(ctx context.Context, message *universal.RoutableMessag

addr := make([]byte, addressLength)
// Message UUIDs are only used for debugging message logs and are not
// copied into the recieverKey used to match responses to requests.
// copied into the receiverKey used to match responses to requests.
uuid := make([]byte, uuidLength)
if _, err := rand.Read(uuid); err != nil {
return nil, err
Expand Down
6 changes: 3 additions & 3 deletions internal/dispatcher/dispatcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -770,21 +770,21 @@ func TestDoNotBlockOnResponder(t *testing.T) {
select {
case <-rsp2.Recv():
case <-ctx.Done():
t.Fatalf("Didn't recieve message for second command: %s", err)
t.Fatalf("Didn't receive message for second command: %s", err)
}

// Check that responderBufferSize messages (and no more!) arrived at the rsp1.
for i := 0; i < receiverBufferSize; i++ {
select {
case <-rsp1.Recv():
case <-ctx.Done():
t.Fatalf("Didn't recieve message for second command: %s", err)
t.Fatalf("Didn't receive message for second command: %s", err)
}
}

select {
case <-rsp1.Recv():
t.Fatalf("Recieved more messages than expected")
t.Fatalf("Received more messages than expected")
case <-ctx.Done():
}
}
Expand Down
4 changes: 0 additions & 4 deletions pkg/connector/ble/ble.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,6 @@ func (c *Connection) Send(ctx context.Context, buffer []byte) error {
return nil
}

func (c *Connection) Recieve() <-chan []byte {
return c.inbox
}

func (c *Connection) VIN() string {
return c.vin
}
Expand Down

1 comment on commit 9c37f2a

@rawmean
Copy link

@rawmean rawmean commented on 9c37f2a Dec 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regarding: " Deleting the latter is an API-breaking change"

Can you please describe in what way this breaks the API so that we can make the required changes?

Please sign in to comment.