MCPcopy Create free account
hub / github.com/Monibuca/engine / InsertBeforeValue

Method InsertBeforeValue

util/list.go:29–33  ·  view source on GitHub ↗
(value T)

Source from the content-addressed store, hash-verified

27 item.Pre.InsertAfter(insert)
28}
29func (item *ListItem[T]) InsertBeforeValue(value T) (result *ListItem[T]) {
30 result = &ListItem[T]{Value: value}
31 item.InsertBefore(result)
32 return
33}
34func (item *ListItem[T]) InsertAfter(insert *ListItem[T]) {
35 if insert.list != nil {
36 panic("item already in list")

Callers 1

insertDCRtpMethod · 0.80

Calls 1

InsertBeforeMethod · 0.95

Tested by

no test coverage detected