Skip to content

Commit

Permalink
Update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
AlekSi committed Sep 25, 2024
1 parent 700dcf6 commit 881acc9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions op_msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ func (msg *OpMsg) SetSections(sections ...OpMsgSection) error {
}

// RawSection0 returns the value of first section with kind 0.
//
// Most callers should use [OpMsg.RawDocument] instead.
func (msg *OpMsg) RawSection0() wirebson.RawDocument {
for _, s := range msg.Sections() {
if s.Kind == 0 {
Expand All @@ -96,6 +98,8 @@ func (msg *OpMsg) RawSection0() wirebson.RawDocument {
}

// RawSections returns the value of section with kind 0 and the value of all sections with kind 1.
//
// Most callers should use [OpMsg.RawDocument] instead.
func (msg *OpMsg) RawSections() (wirebson.RawDocument, []byte) {
var spec wirebson.RawDocument
var seq []byte
Expand Down

0 comments on commit 881acc9

Please sign in to comment.