Skip to content

Commit

Permalink
Export the LoadSyncMessage function
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Meier <ben@meierhost.com>
  • Loading branch information
astromechza committed Oct 26, 2024
1 parent b7d9d51 commit 65b8d49
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sync_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func LoadSyncState(d *Doc, raw []byte) (*SyncState, error) {
// ReceiveMessage should be called with every message created by GenerateMessage
// on the peer side.
func (ss *SyncState) ReceiveMessage(msg []byte) (*SyncMessage, error) {
sm, err := loadSyncMessage(msg)
sm, err := LoadSyncMessage(msg)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -86,7 +86,8 @@ type SyncMessage struct {
cSyncMessage *C.AMsyncMessage
}

func loadSyncMessage(msg []byte) (*SyncMessage, error) {
// LoadSyncMessage decodes a sync message from a byte slice for inspection.
func LoadSyncMessage(msg []byte) (*SyncMessage, error) {
cBytes, free := toByteSpan(msg)
defer free()

Expand Down

0 comments on commit 65b8d49

Please sign in to comment.