common

package
v0.0.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 14, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Shuffle

func Shuffle(n int, swap func(i, j int))

Shuffle provides a global shuffle function that respects test seeding

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service provides thread-safe random number generation with configurable seeding

func New

func New(seed int64) *Service

New creates a new random service with the given seed

func NewDefault

func NewDefault() *Service

NewDefault creates a random service with time-based seed

func (*Service) Shuffle

func (s *Service) Shuffle(n int, swap func(i, j int))

Shuffle shuffles n elements using the provided swap function

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL