sdk/golang/Standard Library/GoContainerRing
Standard Library

GoContainerRing

Go stdlib package — container/ring. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.

Other Methods

.New()Neutral
#
Signature
New(n int) *Ring

New creates a ring of n elements.

.Ring.Do()Neutral
#
Signature
Ring.Do(f func(any))

Do calls function f on each element of the ring, in forward order.

.Ring.Len()Neutral
#
Signature
Ring.Len() int

Len computes the number of elements in ring r.

.Ring.Move()Neutral
#
Signature
Ring.Move(n int) *Ring

Move moves n % r.Len() elements backward (n < 0) or forward (n >= 0)

.Ring.Next()Neutral
#
Signature
Ring.Next() *Ring

Next returns the next ring element. r must not be empty.

.Ring.Prev()Neutral
#
Signature
Ring.Prev() *Ring

Prev returns the previous ring element. r must not be empty.

.Ring()Neutral
#
Signature
type Ring ...

A Ring is an element of a circular list, or ring.

Fully-Qualified Names

FQNField
container/ringfqns[0]

Wrong FQN → 0 findings. Verify with: change fqns to garbage → must produce 0 results.

Import

go.mod
// standard library — no go.mod entry required
rule.py
from codepathfinder.go_rule import ...  # container/ring