Skip to content

Commit

Permalink
object: Inline redundant unexported methods of Object
Browse files Browse the repository at this point in the history
Signed-off-by: Leonard Lyubich <[email protected]>
  • Loading branch information
cthulhu-rider committed Nov 15, 2024
1 parent ebb37bc commit 0422113
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions object/object.go
Original file line number Diff line number Diff line change
Expand Up @@ -827,18 +827,6 @@ func (o *Object) SetParent(v *Object) {
})
}

func (o *Object) initRelations() {
o.setHeaderField(func(h *object.Header) {
h.SetSplit(new(object.SplitHeader))
})
}

func (o *Object) resetRelations() {
o.setHeaderField(func(h *object.Header) {
h.SetSplit(nil)
})
}

// SessionToken returns token of the session within which object was created.
//
// See also [Object.SetSessionToken].
Expand Down Expand Up @@ -910,12 +898,16 @@ func (o Object) HasParent() bool {

// ResetRelations removes all fields of links with other objects.
func (o *Object) ResetRelations() {
o.resetRelations()
o.setHeaderField(func(h *object.Header) {
h.SetSplit(nil)
})
}

// InitRelations initializes relation field.
func (o *Object) InitRelations() {
o.initRelations()
o.setHeaderField(func(h *object.Header) {
h.SetSplit(new(object.SplitHeader))
})
}

// Marshal marshals object into a protobuf binary form.
Expand Down

0 comments on commit 0422113

Please sign in to comment.