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

Method create

util/ring-writer.go:37–43  ·  view source on GitHub ↗
(n int)

Source from the content-addressed store, hash-verified

35}
36
37func (rb *RingWriter[T, F]) create(n int) (ring *Ring[F]) {
38 ring = NewRing[F](n)
39 for p, i := ring, n; i > 0; p, i = p.Next(), i-1 {
40 p.Value = rb.constructor()
41 }
42 return
43}
44
45func (rb *RingWriter[T, F]) Init(n int, constructor func() F) *RingWriter[T, F] {
46 rb.constructor = constructor

Callers 2

InitMethod · 0.95
GlowMethod · 0.95

Calls 1

NextMethod · 0.45

Tested by

no test coverage detected